Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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
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
Applying color to an entire row Dave Excel Discussion (Misc queries) 2 December 3rd 07 10:36 PM
change color of entire row by use conditional format Montu Excel Worksheet Functions 2 November 15th 07 10:02 AM
Change font color across entire row Mac Excel Discussion (Misc queries) 4 November 17th 06 04:13 AM
Highlight entire document and try to change font - won't change. murzy03 Excel Discussion (Misc queries) 1 May 8th 06 07:05 PM
Change color of entire row and column examle packat[_2_] Excel Programming 6 December 26th 04 11:59 PM


All times are GMT +1. The time now is 04:41 AM.

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"