Hi, how about if I want to clear values on colored cells? Not the whole row or column but just the highlighted ones. Or if I want to clear the cells based on the words on another cell? Thank you!
To clear values in colored cells you need to use the other method (Part2). See the video here: ruclips.net/video/-OAfoPi-eX8/видео.htmlsi=cka8OnIL6kvOi2yz That other method loops through target cells and checks for any condition. For example, to clear values for a cell colored yellow you do something like this: For Each cel lIn targetRange If cell.Interior.Color = vbYellow Then cell.Value = "" Next cell To clear cells based on words from other cell you can to use Offset. For example, let's say you want to clear cells which have a cell in the same row and next column with the word "DONE": For Each cel lIn targetRange If cell.Offset(0,1) = "DONE" Then cell.Value = "" Next cell
Nice video looking forward to your next video 😊
Hi, how about if I want to clear values on colored cells? Not the whole row or column but just the highlighted ones. Or if I want to clear the cells based on the words on another cell? Thank you!
To clear values in colored cells you need to use the other method (Part2). See the video here: ruclips.net/video/-OAfoPi-eX8/видео.htmlsi=cka8OnIL6kvOi2yz
That other method loops through target cells and checks for any condition. For example, to clear values for a cell colored yellow you do something like this:
For Each cel lIn targetRange
If cell.Interior.Color = vbYellow Then cell.Value = ""
Next cell
To clear cells based on words from other cell you can to use Offset. For example, let's say you want to clear cells which have a cell in the same row and next column with the word "DONE":
For Each cel lIn targetRange
If cell.Offset(0,1) = "DONE" Then cell.Value = ""
Next cell