ukdane
02-20-2009, 12:53 AM
I have a workbook with two worksheets.
One worksheet is a "set up" page.
The other contains the data.
I have one field that the user can either input a number, or a %. Based on the option they make on the set up page.
How do I format the cell accordingly?
If Range("Setup!AP2") = 1 Then
Sheets("Data").Select
Range("F33").Value = FormatPercent("10%")
Else
Sheets("Data").Select
Range("F33").Value = Format("100")
End If
The above code looks to see if the data is set to be shown in % or as a number, and inputs a default value. However, I need to format the cell F33 so that if the user changes the default, it is shown as a % (or as a whole number).
How do I do this?
One worksheet is a "set up" page.
The other contains the data.
I have one field that the user can either input a number, or a %. Based on the option they make on the set up page.
How do I format the cell accordingly?
If Range("Setup!AP2") = 1 Then
Sheets("Data").Select
Range("F33").Value = FormatPercent("10%")
Else
Sheets("Data").Select
Range("F33").Value = Format("100")
End If
The above code looks to see if the data is set to be shown in % or as a number, and inputs a default value. However, I need to format the cell F33 so that if the user changes the default, it is shown as a % (or as a whole number).
How do I do this?