Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have two columns of data B & K with same number of rows. Column K
values are the result of a cell formula. I want to change the text color of B5 to red if it is less than K5. I have a variable named RowCount available with the number of rows that are in the columns if that can be of any use. TIA Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can do this with conditional formatting - no code needed
Format=Conditional formatting -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Hi, I have two columns of data B & K with same number of rows. Column K values are the result of a cell formula. I want to change the text color of B5 to red if it is less than K5. I have a variable named RowCount available with the number of rows that are in the columns if that can be of any use. TIA Mike |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom, I have fooled around with that, but I forgot to mention that Column K
will be deleted afterwards and I want the appropriate numbers in B to remain Red. I could not get that to happen with Conditional Formatting. I think I need a loop. Mike "Tom Ogilvy" wrote in message ... You can do this with conditional formatting - no code needed Format=Conditional formatting -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Hi, I have two columns of data B & K with same number of rows. Column K values are the result of a cell formula. I want to change the text color of B5 to red if it is less than K5. I have a variable named RowCount available with the number of rows that are in the columns if that can be of any use. TIA Mike |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range, cell as Range
set rng = Range(cells(1,2),cells(rows.count,2).end(xlup)) for each cell in rng if cell.Value < cell.offset(0,9).Value then cell.font.ColorIndex = 3 else cell.font.ColorIndex = xlautomatic end if Next -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Tom, I have fooled around with that, but I forgot to mention that Column K will be deleted afterwards and I want the appropriate numbers in B to remain Red. I could not get that to happen with Conditional Formatting. I think I need a loop. Mike "Tom Ogilvy" wrote in message ... You can do this with conditional formatting - no code needed Format=Conditional formatting -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Hi, I have two columns of data B & K with same number of rows. Column K values are the result of a cell formula. I want to change the text color of B5 to red if it is less than K5. I have a variable named RowCount available with the number of rows that are in the columns if that can be of any use. TIA Mike |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked! I was having trouble with set rng=.
"Tom Ogilvy" wrote in message ... Dim rng as Range, cell as Range set rng = Range(cells(1,2),cells(rows.count,2).end(xlup)) for each cell in rng if cell.Value < cell.offset(0,9).Value then cell.font.ColorIndex = 3 else cell.font.ColorIndex = xlautomatic end if Next -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Tom, I have fooled around with that, but I forgot to mention that Column K will be deleted afterwards and I want the appropriate numbers in B to remain Red. I could not get that to happen with Conditional Formatting. I think I need a loop. Mike "Tom Ogilvy" wrote in message ... You can do this with conditional formatting - no code needed Format=Conditional formatting -- Regards, Tom Ogilvy Mike Fogleman wrote in message ... Hi, I have two columns of data B & K with same number of rows. Column K values are the result of a cell formula. I want to change the text color of B5 to red if it is less than K5. I have a variable named RowCount available with the number of rows that are in the columns if that can be of any use. TIA Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change color if text is = or not, to text in other column | New Users to Excel | |||
Can Text Function change output text color? | Excel Discussion (Misc queries) | |||
Change text color | Excel Discussion (Misc queries) | |||
Change of text or background color doesn't change on the screen. | Excel Discussion (Misc queries) | |||
Text Color Change | Excel Worksheet Functions |