Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.
.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
VBA setting Range Jeff Excel Discussion (Misc queries) 1 December 2nd 05 07:36 PM
setting a command button to be a hyperlink neowok[_70_] Excel Programming 0 July 15th 04 04:55 PM
Setting a Range Tempy Excel Programming 6 June 15th 04 03:46 PM
range setting Mike Harris Excel Programming 5 November 22nd 03 05:07 AM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"