View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Stone Frank Stone is offline
external usenet poster
 
Posts: 134
Default Setting Range Command

have you tried conditional fomating.
go to Formatsconditional formats.
a dialog box will appear. you can format a cell or range
of cell to many conditions but only for values in the cell.
you can not format based on conditions in another cell.

-----Original Message-----
New to Visual Basic.
Formatting cells in Excel, I need to set background color

for a cell if a condition is met. The required cell is
variable, based on row and colunm number. Range needs an
absolute value. Is there a way of conerting row and column
to value range command needs or is ther a better way?

If totRBCAmt maxRBC Then
ActiveSheet.Cells(rowNbr, c8Nbr).Font.Bold = True
ActiveSheet.Cells(rowNbr, c8Nbr).Font.ColorIndex = 3
Range("O6").Select
With Selection.Interior
.ColorIndex = 48
.Pattern = xlSolid
End With
ElseIf totRBCAmt cauRBCAmt Then

Thanks
--
Larry T.
.