Colour first 3 numbers separated by vertical bar

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000</SPAN></SPAN>
Hi,</SPAN></SPAN>

I need to get coloured first 3 numbers as shown in the example below</SPAN></SPAN>

0 | 0 | 0 | 2 | 2 | 2 | 1</SPAN>
0 | 0 | 1 | 2 | 2 | 1 | 1</SPAN>
0 | 0 | 1 | 2 | 2 | 2 | 0</SPAN>
0 | 0 | 2 | 2 | 1 | 1 | 1</SPAN>
0 | 0 | 2 | 2 | 1 | 2 | 0</SPAN>
0 | 0 | 2 | 2 | 2 | 0 | 1</SPAN>
0 | 0 | 2 | 2 | 2 | 1 | 0</SPAN>
0 | 1 | 0 | 2 | 2 | 1 | 1</SPAN>
0 | 1 | 0 | 2 | 2 | 2 | 0</SPAN>
0 | 1 | 1 | 0 | 1 | 2 | 2</SPAN>
0 | 1 | 1 | 0 | 2 | 1 | 2</SPAN>
0 | 1 | 1 | 0 | 2 | 2 | 1</SPAN>
0 | 1 | 1 | 1 | 0 | 2 | 2</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>


Thank you in advance</SPAN></SPAN>

Regards,</SPAN>
Kishan</SPAN></SPAN>
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
If what you show is what you want (numbers and vertical bars colored), then give this macro a try...
Code:
Sub ColorFirstThreeNumbers()
  Dim R As Long
  For R = 5 To Cells(Rows.Count, "A").End(xlUp).Row
    Cells(R, "A").Characters(1, 9).Font.Color = vbRed
  Next
End Sub
 
Upvote 0
If what you show is what you want (numbers and vertical bars colored), then give this macro a try...
Code:
Sub ColorFirstThreeNumbers()
  Dim R As Long
  For R = 5 To Cells(Rows.Count, "A").End(xlUp).Row
    Cells(R, "A").Characters(1, 9).Font.Color = vbRed
  Next
End Sub
Great Rick, macro worked like magic (y)</SPAN></SPAN>

Thank you so much for your immediate help
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Kishan
</SPAN></SPAN>:)
 
Upvote 0

Forum statistics

Threads
1,215,770
Messages
6,126,794
Members
449,337
Latest member
BBV123

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