View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Conditional formatting activecell offset

I assume to use Worksheet_SelectionChange(ByVal Target As Range)

Whe

if I select cell A2 then cell C1 is highlighted.
if I select cell A3 then cell E1 is highlighted.
if I select cell A4 then cell G1 is highlighted.
etc.
etc.

I think I can carry it on over to column Y if I can see what the first couple of formula or code should be...

I figure to use one of these to clear previous fill colors from the range on each selection.

Range("C1:Y1").Interior.ColorIndex = xlNone
Range(Cells(1, 3), Cells(1, 25)).Interior.ColorIndex = xlNone

If it can be done on the sheet conditional formatting function that would be just fine. I could not figure out the formula for a TRUE for the selection cell or column header cell.

Thanks,
Howard