+ Reply to Thread
Results 1 to 3 of 3

Change entire row color

  1. #1
    Registered User
    Join Date
    07-27-2005
    Posts
    24

    Change entire row color

    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!

  2. #2
    Rowan
    Guest

    RE: 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. #3
    Norman Jones
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1