enter "3" in A1 and generate 3 symbols in B1

Granville

New Member
Joined
Jul 12, 2011
Messages
2
I'd like to vsually display numbers in column "A" as symbols in column "B". For example: I enter the number "5" in cell "A3" and five symbols (wingdings 110) are automatically entered in cell "B3". Sounds odd but will prove very usefull if I can figure out how to make this work. I really appreciate any help I can get with this. BTW, I'm using MS Excel 2007.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Code:
[COLOR="Blue"]Private[/COLOR] [COLOR="Blue"]Sub[/COLOR] Worksheet_Change([COLOR="Blue"]ByVal[/COLOR] Target [COLOR="Blue"]As[/COLOR] Range)
    Application.EnableEvents = [COLOR="Blue"]False[/COLOR]
    [COLOR="Blue"]If[/COLOR] [COLOR="Blue"]Not[/COLOR] Intersect(Target, Columns("A:A")) [COLOR="Blue"]Is[/COLOR] [COLOR="Blue"]Nothing[/COLOR] [COLOR="Blue"]Then[/COLOR]
        [COLOR="Blue"]With[/COLOR] Target.Offset(0, 1)
            .Value = WorksheetFunction.Rept(Chr(110), Target)
            .Font.Name = "Windings"
        [COLOR="Blue"]End[/COLOR] [COLOR="Blue"]With[/COLOR]
    [COLOR="Blue"]End[/COLOR] [COLOR="Blue"]If[/COLOR]
    Application.EnableEvents = [COLOR="Blue"]True[/COLOR]
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]Sub[/COLOR]
 
Last edited:
Upvote 0
Select Column B and change its font to Wingdings. Then put this formula in B1 and copy it down as far as needed...

=REPT("n",A1)

If the character with ASCII value 110 needs to be changed, just replace the "n" with that character. If you might need characters outside of the keyboards range, then you can use the CHAR function....

=REPT(CHAR(110),A1)

Now, when you type a number in Column A, the symbol will be repeated than many times in Column B.
 
Upvote 0
Thank you both for the quick resonse. This works perfect! Rick's solution was easier for me because I don't know code very well but I appeciate Sektor's solution. Thanks again!
 
Upvote 0
Found a typo:
Code:
...
.Font.Name = "Win[B][COLOR="Red"]g[/COLOR][/B]dings"
...
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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