Change Font Color
Results 1 to 4 of 4

Thread: Change Font Color
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular JTL9161's Avatar
    Join Date
    Aug 2012
    Location
    Connecticut - USA
    Posts
    307
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Change Font Color

    I have a spreadsheet that is updated daily with about 1000 rows. I use different color fonts to breakout the dates through out the month. Each day some new rows of data are added and previous rows are updated. When the previous rows are updated they font color is automatic (black) yet the rest of the row is another color font based on the day of the month. I filter the column(s) that are updated to show just automatic fonts.

    My question. What macro code can I add to my existing updating code that would go down the column (lets say column "C") to each cell with automatic font the look either at column "B" or "D" and change the data in column "C" to the same color as the adjacent column(s)? Or is this not doable?

    Thank You,
    James

  2. #2
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    5,213
    Post Thanks / Like
    Mentioned
    49 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Change Font Color

    Try the following, to change the font color of the column C according to column B

    Code:
    Sub test_color()
        Dim c As Range
        For Each c In Range("C2", Range("C" & Rows.Count).End(xlUp))
            c.Font.Color = c.Offset(, -1).Font.Color
        Next
    End Sub
    Regards Dante Amor

  3. #3
    Board Regular JTL9161's Avatar
    Join Date
    Aug 2012
    Location
    Connecticut - USA
    Posts
    307
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Change Font Color

    Perfect, Thank you.

  4. #4
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    5,213
    Post Thanks / Like
    Mentioned
    49 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Change Font Color

    Quote Originally Posted by JTL9161 View Post
    Perfect, Thank you.
    I'm glad to help you. Thanks for the feedback.
    Regards Dante Amor

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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