ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   writing a greater than/less than formula (https://www.excelbanter.com/excel-worksheet-functions/85226-writing-greater-than-less-than-formula.html)

BobVA

writing a greater than/less than formula
 
Hello,

I'm ok in Excel but I need to write a formula to calculate that if sales are
greater than 100,000 but less than 200,000 multiply that number by 25%.
Probably real easy for some of you but I can't quite get it to work. Any
suggestion is welcome.

pdberger

writing a greater than/less than formula
 
Bob --

If your sales are in A1, then here's a formula that works:

=IF(AND(A2100000,A2<200000),A2*1.25,"")

You'll need to add whatever happens if it's outside the range.

HTH

"BobVA" wrote:

Hello,

I'm ok in Excel but I need to write a formula to calculate that if sales are
greater than 100,000 but less than 200,000 multiply that number by 25%.
Probably real easy for some of you but I can't quite get it to work. Any
suggestion is welcome.


Pete_UK

writing a greater than/less than formula
 
This raises a few other questions, such as what if sales are less than
or equal to 100,000 or greater than or equal to 200,000? But anyway,
you can try this, assuming the sales figure is in A1:

=IF(AND(A1100000,A1<200000),A1*0.25,A1)

This returns A1 if the conditions are not met.

Hope this helps.

Pete


Fred Smith

writing a greater than/less than formula
 
Use the And function:

=if(and(a1100000,a1<200000),a1*1.25,valueiffalse)

--
Regards,
Fred


"BobVA" wrote in message
...
Hello,

I'm ok in Excel but I need to write a formula to calculate that if sales are
greater than 100,000 but less than 200,000 multiply that number by 25%.
Probably real easy for some of you but I can't quite get it to work. Any
suggestion is welcome.




Zenaida

writing a greater than/less than formula
 

I did not know what cell you wanted this formula in so you would need to
replace A3 with the correct cell.

This formula should work but if the value is 100,000 it will not be
multiplied by 25% because you state 100000 and if the value is
200,000 it will not be multiplied by 25% because you state < 200000.

You will need to modify the formula if the values of 100,000 and
200,000 are suppose to be multiplied by 25%.

Also, if the value is greater than 200,000 and less than 100,000, what
do you want the formula to do? With an If statement you have to tell
the formula what you want when the result is true and what you want if
the result is false. I did not know what you wanted to happen if the
result was false. So I referenced the cell. So whatever is in cell A3
is what will appear in the cell that contains this formula.


Code:
--------------------
=IF(AND(A3100000, A3<200000), A3*25%, A3)
--------------------


--
Zenaida


------------------------------------------------------------------------
Zenaida's Profile: http://www.excelforum.com/member.php...o&userid=33802
View this thread: http://www.excelforum.com/showthread...hreadid=536202


MINI MART

writing a greater than/less than formula
 


"BobVA" wrote:

Hello,

I'm ok in Excel but I need to write a formula to calculate that if sales are
greater than 100,000 but less than 200,000 multiply that number by 25%.
Probably real easy for some of you but I can't quite get it to work. Any
suggestion is welcome.


Corey

writing a greater than/less than formula
 
Try:
=IF(A1200000,"",IF(A1<100000,"",IF(A1=100000,A1* 0.25)))

where A1 is your data.
Above formula will give a result if A1 is equal to 100,000 (min)and 200,000
(max)also.

If data is above or below range then nothing is displayed.

Corey....

"MINI MART" <MINI wrote in message
...


"BobVA" wrote:

Hello,

I'm ok in Excel but I need to write a formula to calculate that if sales
are
greater than 100,000 but less than 200,000 multiply that number by 25%.
Probably real easy for some of you but I can't quite get it to work. Any
suggestion is welcome.




Go-go

writing a greater than/less than formula
 
I have a similar scenario but can you please show me what that function would
look like if the conditions weren't met and I don't want the number to return
to A1?

"Pete_UK" wrote:

This raises a few other questions, such as what if sales are less than
or equal to 100,000 or greater than or equal to 200,000? But anyway,
you can try this, assuming the sales figure is in A1:

=IF(AND(A1100000,A1<200000),A1*0.25,A1)

This returns A1 if the conditions are not met.

Hope this helps.

Pete



David Biddulph[_2_]

writing a greater than/less than formula
 
If, instead of A1, you want the function to return an empty string "", then
change
=IF(AND(A1100000,A1<200000),A1*0.25,A1)
to
=IF(AND(A1100000,A1<200000),A1*0.25,"")

If you want the formula to return something different if the condition isn't
met, then put that after the second comma, instead of A1 or "".
--
David Biddulph

"Go-go" wrote in message
...
I have a similar scenario but can you please show me what that function
would
look like if the conditions weren't met and I don't want the number to
return
to A1?

"Pete_UK" wrote:

This raises a few other questions, such as what if sales are less than
or equal to 100,000 or greater than or equal to 200,000? But anyway,
you can try this, assuming the sales figure is in A1:

=IF(AND(A1100000,A1<200000),A1*0.25,A1)

This returns A1 if the conditions are not met.

Hope this helps.

Pete






All times are GMT +1. The time now is 07:34 AM.

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