Format last three digits of a cell to appear in bold?

kznmrexcel

Board Regular
Joined
Jun 16, 2010
Messages
86
Office Version
  1. 2016
Platform
  1. MacOS
Hi, everyone,
Is there a way to format *part* of a cell to appear in bold? I'm thinking not, but thought I'd ask.

Example:
1234567

I would imagine that I would need a workaround, such as grabbing the last three digits and having them appear in a separate column which I could then bold.

Any help is appreciated.
Thanks,
Karen
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Don't think you can do that with numbers, but you could use
Excel Formula:
=RIGHT(A2,3)
to get the last 3 characters in another cell.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
If this is something you're doing purely for aesthetic reasons, and VBA is an option for you, then the following should give you what you want. Assumes your data starts in A1 (you can amend the range definition to suit your needs).

VBA Code:
Option Explicit
Sub BoldLast3()
    Dim c As Range, rng As Range, i As Long
    Set rng = Range("A1").CurrentRegion
    For Each c In rng
        c = "'" & c
        For i = (Len(c) - 2) To Len(c)
            c.Characters(i).Font.Bold = True
        Next i
    Next c
End Sub
 
Upvote 0
One potential problem with that, is it converts the number into text, which could cause the OP problems.
 
Upvote 0
One potential problem with that, is it converts the number into text, which could cause the OP problems.
That's true @Fluff, hence my "aesthetic" comment, although when testing I note that simple arithmetic formulas that reference the affected cells remain correct after running the code. Good point though.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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