A VBA IF function that returns an msg with two different font in the same cell

ifu06416

Board Regular
Joined
Sep 5, 2011
Messages
56
Office Version
  1. 365
Hi there,

I have written an if macro that toggles a hide/unhide range when the ranges header is clicked.

However i would like to add a down arrow for when the range is hidden and an up arrow for when it is unhidden.

my code so far is;

Sub numbers()


Range("8:21").Select
If Selection.EntireRow.Hidden = True Then
Selection.EntireRow.Hidden = False
Else
Selection.EntireRow.Hidden = True
End If


If Selection.EntireRow.Hidden = True Then
Range("G7").Value = "Handler q"
Else
Range("G7").Value = "Handler p"
End If


End Sub

essentially i was looking for away to insert the word "Handler" in calibri and the "q" and "p" in windings3 (which will be the up/down arrows).

thanks,

john.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about
Code:
Range("G7").Characters(9, 1).Font.Name = "Wingdings 3"
 
Upvote 0
so simple but it would have taken forever for me to find the answer.

much appreciated.

John
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
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