Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Range Command
Frank,
Using your process pointed me in right direction. Was able to determine correct coding needed to complete item. Turned out to be one line of code, not the code I was trying to use. Thanks -- Larry T. "Frank Stone" wrote: 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. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
VBA setting Range | Excel Discussion (Misc queries) | |||
setting a command button to be a hyperlink | Excel Programming | |||
Setting a Range | Excel Programming | |||
range setting | Excel Programming |