How can you determine if a cell is formatted as a percent?

Q

quartz

Hello, I am using VBA in Excel XP with Win 2000

I need a VBA method to determine if a cell is formatted as a percentage

Could someone please post back example code to do this?
 
J

Jan Karel Pieterse

Hi Quartz,
I need a VBA method to determine if a cell is formatted as a percentage.

If InStr(ActiveCell.NumberFormat, "%") Then
MsgBox "Percentage"
Else
MsgBox "Other"
End If


Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 
Top