View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Conditional Formatting in ref to active cell

This doesn't use conditional formatting, but achieves the same effect.

Pthis code in the code page for the sheet where you want this to happen:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Range("B1").EntireColumn.Interior.Colo rIndex = xlColorIndexNone
ActiveSheet.Range("B" & Target.Row).Interior.ColorIndex = 36
End Sub

If you are new to macros, david mcritchie has some instructions on his site
for navigating the vba editor and how to copy/paste macros into your project.

http://www.mvps.org/dmcritchie/excel/excel.htm

Hope this helps,

Hutch

"KUMPFfrog" wrote:

I would like to apply conditional formatting in column B to highlight the
cell in the same row as the active/selected cell. Is there a way to
reference the active cell in a function/formula? I'm using 2003 pro.