Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1. I have this formular written with VBA as follows, it is working
fine. Where the string "key is zero", however, I would like to replace it with the next formular. That would say, if the condition is true, format the range with this color. Range("B17:D17").Select ActiveCell.FormulaR1C1 = "=IF(COUNTA(RC[4]:RC[10])<0,IF(RC[3]=0,""key is zero"",""""),IF(RC[3]<0,""data is zero"",""""))" Formular replacing the above string "key is zero", Range("B17:D17").Select With Selection.Interior.ColorIndex = 6 .Pattern = xlSolid End With 2. I want to do the above for rows from 17 to 200. Thanks for your input. Faye |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
mabye this.
sub colorit() for each c in range("b17:d17") if c=0 then c.Interior.ColorIndex = 6 next c end sub -- Don Guillett SalesAid Software "Faye" wrote in message oups.com... 1. I have this formular written with VBA as follows, it is working fine. Where the string "key is zero", however, I would like to replace it with the next formular. That would say, if the condition is true, format the range with this color. Range("B17:D17").Select ActiveCell.FormulaR1C1 = "=IF(COUNTA(RC[4]:RC[10])<0,IF(RC[3]=0,""key is zero"",""""),IF(RC[3]<0,""data is zero"",""""))" Formular replacing the above string "key is zero", Range("B17:D17").Select With Selection.Interior.ColorIndex = 6 .Pattern = xlSolid End With 2. I want to do the above for rows from 17 to 200. Thanks for your input. Faye |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vba script help | Excel Programming | |||
Help with VB script please? | Excel Programming | |||
Excel 2000/XP script to Excel97 script | Excel Programming | |||
VB Script help | Excel Programming |