VBA need arrow

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
1,010
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

I need arrow instead of p,q r font (Wingding)
can you please see the attaced file.


Book1
EFGHIJKLMNO
5p
6r
7q
8
9Brand Favorability66%5.8 p66%-0.6 q0%0.0
10Consideration Intent66%3.766%-4.10%0.0
11Consideration First Choice13%-3.216%-2.30%0.0
12Purchase Intent63%4.451%3.30%0.0
13BA: Is a brand for me61%5.6 r49%0.80%0.0
14Additional Brand Metrics
Sheet1

1666713579506.png
 
I have explained this at least twice already and posted pictures that seem to show what you want. If the pics I posted don't show you want you want then you have to explain why.

I select/highlight "p" character...

View attachment 77027
I choose Wingdings3 and green ...
View attachment 77029

result:
View attachment 77030

If that's not what you want then you need to explain why. If it is what you want then you need to do the same.

Hi Micron,

Sorry for the inconvenience but i was looking for the macro as i have lot of data with same scenario if i do manually diffenately it will take lot of time

can you please help me wtih macro :)

Regards
Sanjeev
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You should have said so at the beginning. I'll see what I can do based on what you've posted, which is columns G and I and code behind the sheet.
Sure Micron,

Thank you so much for you help on this :)
 
Upvote 0
try this in your sheet module
VBA Code:
Sub WingdingFont()

SetWingdingFont Range("G1:G" & Range("G" & Rows.count).End(xlUp).Row)
SetWingdingFont Range("I1:I" & Range("I" & Rows.count).End(xlUp).Row)

End Sub

Sub SetWingdingFont(rng As Range)
Dim c As Range

For Each c In rng
     Select Case Right(c.Value, 1)
          Case "p"
               With c.Characters(InStrRev(c.Value, "p", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbGreen 'RGB(0, 255, 0)
                    .Bold = True
               End With
          Case "r"
               With c.Characters(InStrRev(c.Value, "r", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbGreen 'RGB(0, 255, 0)
                    .Bold = False
               End With
          
          Case "q"
               With c.Characters(InStrRev(c.Value, "q", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbRed  'RGB(255, 0, 0)
                    .Bold = True
               End With
     End Select
Next

Set c = Nothing

End Sub
 
Upvote 0
Solution
try this in your sheet module
VBA Code:
Sub WingdingFont()

SetWingdingFont Range("G1:G" & Range("G" & Rows.count).End(xlUp).Row)
SetWingdingFont Range("I1:I" & Range("I" & Rows.count).End(xlUp).Row)

End Sub

Sub SetWingdingFont(rng As Range)
Dim c As Range

For Each c In rng
     Select Case Right(c.Value, 1)
          Case "p"
               With c.Characters(InStrRev(c.Value, "p", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbGreen 'RGB(0, 255, 0)
                    .Bold = True
               End With
          Case "r"
               With c.Characters(InStrRev(c.Value, "r", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbGreen 'RGB(0, 255, 0)
                    .Bold = False
               End With
         
          Case "q"
               With c.Characters(InStrRev(c.Value, "q", -1), 1).Font
                    .Name = "Wingdings 3"
                    .Color = vbRed  'RGB(255, 0, 0)
                    .Bold = True
               End With
     End Select
Next

Set c = Nothing

End Sub
Amazing..!!! Micron.

it works perfectly :) thank you so muchhhh for your help on this :):)
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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