Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: VBA code to change font color from red to black
Thanks Thanks: 0 Likes Likes: 0

  1. #11
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,190
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA code to change font color from red to black

    Will the "in (-)" only ever be in red?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  2. #12
    Board Regular
    Join Date
    May 2015
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA code to change font color from red to black

    Yes please

  3. #13
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,190
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA code to change font color from red to black

    Ok, how about
    Code:
    Sub gubertu()
       Dim Ws As Worksheet
       
       With Application
          .FindFormat.Clear
          .FindFormat.Font.Color = 255
          .ReplaceFormat.Clear
          .ReplaceFormat.Font.ColorIndex = xlAutomatic
       End With
       
       For Each Ws In Worksheets
          Ws.UsedRange.Replace "", "", xlPart, , , , True, True
       Next Ws
       With Application
          .FindFormat.Clear
       End With
       For Each Ws In Worksheets
          Ws.UsedRange.Replace "in (-)", "in (-)", xlPart, , , , False, True
       Next Ws
       Application.ReplaceFormat.Clear
    End Sub
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  4. #14
    Board Regular
    Join Date
    May 2015
    Posts
    98
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA code to change font color from red to black

    This is just what I wanted. Thanks very much for your help!! This code is great!

  5. #15
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,190
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: VBA code to change font color from red to black

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

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
  •