check percentage or whole number

A

Alan

Is there a way to check if a user enter a percentage or a regular number into
a cell, then apply different formula to it?

Note: user will enter a huge number like 2,345,678, or 22% (of something)
 
D

Dave Peterson

Maybe...

=if(a1<1,"maybe percentage","maybe not")

What happens at 100% = 1?
 
A

Alan

Dave, thx..
but what if the percent entry will over 100%, or even 1000%.
do you know if there is any way to convert this 100% number to text, and
then perform a search on "%"?

Alan
 
D

Dave Peterson

You can convert any number to a percentage, so I don't think that's the
solution:

=text(a1,"0%")

If you're lucky, you could use something like:

=CELL("Format",A1)
or
=if(left(CELL("Format",A1),1)="P","percentage","nope")
 

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

Top