ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   check percentage or whole number (https://www.excelbanter.com/setting-up-configuration-excel/63557-check-percentage-whole-number.html)

Alan

check percentage or whole number
 
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)

Dave Peterson

check percentage or whole number
 
Maybe...

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

What happens at 100% = 1?

Alan wrote:

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)


--

Dave Peterson

Alan

check percentage or whole number
 
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

"Dave Peterson" wrote:

Maybe...

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

What happens at 100% = 1?

Alan wrote:

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)


--

Dave Peterson


Dave Peterson

check percentage or whole number
 
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","no pe")



Alan wrote:

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

"Dave Peterson" wrote:

Maybe...

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

What happens at 100% = 1?

Alan wrote:

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)


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com