Make font colour RED of the right side numbers which are… separated by vertical bar

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,371
Office Version
  1. 2010
Using Excel 2010

Hello,

I have got numbers separated by vertical bar in the range cells B6:B25 originally they are font black.

I want is there any way to colour right side numbers which are separated by vertical bar with RED font. Like the image attached.

Excel Question ExcelFourms.xls
ABC
1
2
3
4
5
61 | 0
79 | 10
811 | 0
994 | 20
10108 | 0
11120 | 140
12136 | 40
13919 | 1
14720 | 10
15970 | 120
161029 | 1
171082 | 18
181143 | 82
191199 | 100
201262 | 102
211319 | 1212
221384 | 1789
2310015 | 17
2417225 | 175
2519230 | 1759
26
27
Sheet3


Thank you.

Regards,
Moti
 

Attachments

  • Red Fonts.png
    Red Fonts.png
    17.9 KB · Views: 6
Last edited:
Might be best anyway then to turn off screen updating while the process is being done.

VBA Code:
Sub RedFont_v3()
  Dim c As Range
 
  Application.ScreenUpdating = False
  For Each c In Worksheets("Sheet3").Range("B6:B25")  '<~~ *** Check sheet & range ***
    With c.Characters(InStr(1, c, "|") + 1, Len(c)).Font
      .Color = vbRed
      .Bold = True
    End With
  Next c
  Application.ScreenUpdating = True
End Sub

Peter_SSs, this worked absolutely perfect.​


Thank you very much

Kind Regards,
Moti :)
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,831
Messages
6,127,140
Members
449,362
Latest member
Bracelane

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top