ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   if, and statement (https://www.excelbanter.com/new-users-excel/18033-if-statement.html)

ron1234

if, and statement
 
I need to do an if and statement something like this-
if A1=1 and A2x(A1)110 then no more than 10, but
if A2=2 and A2xA125 then no more than 25

so if A2= 12 and A1=1 then the result will be 10
but if A2= 12 and A1=2 then the result will be 24
but if A2= 15 and A1=2 then the reult will be 25

I know it is a lot, but you can guys figure it out.

Ragdyer

Try this:

=MIN((A1=1)*A2,10)+MIN(2*(A1=2)*A2,25)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"ron1234" wrote in message
...
I need to do an if and statement something like this-
if A1=1 and A2x(A1)110 then no more than 10, but
if A2=2 and A2xA125 then no more than 25

so if A2= 12 and A1=1 then the result will be 10
but if A2= 12 and A1=2 then the result will be 24
but if A2= 15 and A1=2 then the reult will be 25

I know it is a lot, but you can guys figure it out.



CLR

Another way...........

=IF(A1=1,MIN(A1*A2,10),IF(A1=2,MIN(A1*A2,25)))

Vaya con Dios,
Chuck, CABGx3


"ron1234" wrote in message
...
I need to do an if and statement something like this-
if A1=1 and A2x(A1)110 then no more than 10, but
if A2=2 and A2xA125 then no more than 25

so if A2= 12 and A1=1 then the result will be 10
but if A2= 12 and A1=2 then the result will be 24
but if A2= 15 and A1=2 then the reult will be 25

I know it is a lot, but you can guys figure it out.




ron1234

This worked great!! My formula was actually more complex than described. The
other reply did not work, but CLR's worked wonderfully, 3 hours of agony.
THANKS!!!!

"CLR" wrote:

Another way...........

=IF(A1=1,MIN(A1*A2,10),IF(A1=2,MIN(A1*A2,25)))

Vaya con Dios,
Chuck, CABGx3


"ron1234" wrote in message
...
I need to do an if and statement something like this-
if A1=1 and A2x(A1)110 then no more than 10, but
if A2=2 and A2xA125 then no more than 25

so if A2= 12 and A1=1 then the result will be 10
but if A2= 12 and A1=2 then the result will be 24
but if A2= 15 and A1=2 then the reult will be 25

I know it is a lot, but you can guys figure it out.






All times are GMT +1. The time now is 02:39 PM.

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