![]() |
How can you determine if a cell is formatted as a percent?
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? |
How can you determine if a cell is formatted as a percent?
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 |
How can you determine if a cell is formatted as a percent?
MsgBox ActiveCell.NumberFormat = "0.00%"
HTH Regards Pascal "quartz" a écrit dans le message de news: ... 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? |
How can you determine if a cell is formatted as a percent?
Thanks Jan! I never thought of using "InStr" like that :-
|
All times are GMT +1. The time now is 12:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com