View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Highlight first blank cell in column

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.