Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change entire row color
I know how to iterate down the rows, but how do I assign an entire row font color. To assign red or blue, would it be something like: if cells(i,1).Value = "Non-Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(255, 0, 0) else if cells(i,1).Value = "Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(0, 0, 255) end if end if Thanks in advance everyone -- mthoma ----------------------------------------------------------------------- mthomas's Profile: http://www.excelforum.com/member.php...fo&userid=2564 View this thread: http://www.excelforum.com/showthread.php?threadid=39078 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change entire row color
cells(i,1).EntireRow.Font.Color = RGB(255, 0, 0)
Regards Rowan "mthomas" wrote: I know how to iterate down the rows, but how do I assign an entire row a font color. To assign red or blue, would it be something like: if cells(i,1).Value = "Non-Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(255, 0, 0) else if cells(i,1).Value = "Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(0, 0, 255) end if end if Thanks in advance everyone! -- mthomas ------------------------------------------------------------------------ mthomas's Profile: http://www.excelforum.com/member.php...o&userid=25649 View this thread: http://www.excelforum.com/showthread...hreadid=390783 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change entire row color
Hi M,
Try something like: Sub AAA() Dim i As Long For i = 1 To 10 With Cells(i, 1) If .Value = "Non-Interum Servicing" Then .EntireRow.Font.Color = RGB(255, 0, 0) ElseIf .Value = "Interum Servicing" Then .EntireRow.Font.Color = RGB(0, 0, 255) End If End With Next i End Sub --- Regards, Norman "mthomas" wrote in message ... I know how to iterate down the rows, but how do I assign an entire row a font color. To assign red or blue, would it be something like: if cells(i,1).Value = "Non-Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(255, 0, 0) else if cells(i,1).Value = "Interum Servicing" then Worksheet.Range.EntireRow.Font.Color = RGB(0, 0, 255) end if end if Thanks in advance everyone! -- mthomas ------------------------------------------------------------------------ mthomas's Profile: http://www.excelforum.com/member.php...o&userid=25649 View this thread: http://www.excelforum.com/showthread...hreadid=390783 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Applying color to an entire row | Excel Discussion (Misc queries) | |||
change color of entire row by use conditional format | Excel Worksheet Functions | |||
Change font color across entire row | Excel Discussion (Misc queries) | |||
Highlight entire document and try to change font - won't change. | Excel Discussion (Misc queries) | |||
Change color of entire row and column examle | Excel Programming |