% Sign to Show on a User Form

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
946
Office Version
  1. 2016
Platform
  1. Windows
Code:
Private Sub Percent_Button_Click()
On Error GoTo ErrorHandler

Percent_Input = 1 - (REV_Input / Budget_Input)
Selection.Style = "Percent"
Exit Sub
    
ErrorHandler:
MsgBox ("Both REV and Budget Fields Must Have a Number Input")

End Sub

Hello All,
I have an annoying problem here with my user form. Above is my code so when I select the Percent Button, the corresponding field should show a number with the percent sign. For example, if I have REV_Input as 5, and Budget_Input as 10, the Percent_Input field keeps showing .5...instead of 50%, like I would like. How do I get the % sign to show in the corresponding user form field?
Thanks for the help
excel 2013
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Use the Format function.
Code:
Percent_Input = Format(1 - (REV_Input / Budget_Input), "0%")
 
Upvote 0

Forum statistics

Threads
1,214,619
Messages
6,120,550
Members
448,970
Latest member
kennimack

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