Highlight first blank cell in column
In keeping with my response to your latest response to me in the other
sub-thread, it would be better to use either of these instead....
Columns("D").SpecialCells(xlCellTypeBlanks)(1).Int erior.ColorIndex=3
or
Columns("D").Find("", After:=Cells(Rows.Count, "D")).Interior.ColorIndex=3
--
Rick (MVP - Excel)
"Rick Rothstein" wrote in message
...
I think you would need to modify your code to this to protect against D1
being a blank cell...
Range("D1").End(xlDown).Offset(1+2*(Range("D1")="" )).Interior.ColorIndex=3
--
Rick (MVP - Excel)
"Jacob Skaria" wrote in message
...
You can avoid looping if D13 is a blank cell (no formula within).
Range("D1").End(xlDown).Offset(1).Interior.ColorIn dex = 3
--
Jacob
"gotroots" wrote:
What code do I need to allow the first blank cell found in a range to be
highlighted.
Example
D1:D12 contains a value
D13 is the first blank cell in "D"
C5 is hightlighted
when code is run D13 is highlighted
Thank you if you can help with this.
|