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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top