condition formula

RAMU

Active Member
Joined
Dec 11, 2009
Messages
345
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
Dear Friends,

Am trying to solve a formula for last few hours but yet to solve.

A B C D E
1 GCV CQ RQ MOIS GRN QTY
2 4500 4


IF A2 =4500 & D2=4, THEN E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
IF A2 >4500 & D2>4, THEN E2 WILL BE (LOWER QTY IN BETWEEN B2 & C2)-(LOWER QTY IN BETWEEN B2 & C2*(D2-4))
IF A2 >4500 & D2<4, THEN E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
IF A2 <4500 & D2>4, THEN E2 WILL BE( (LOWER QTY IN BETWEEN B2 & C2/4500*A2)-(LOWER QTY IN BETWEEN B2 & C2*(D2-4)))
IF A2 <4500 & D2<4, THEN E2 WILL BE (LOWER QTY IN BETWEEN B2 & C2/4500*A2)

BUT IN CASE B2 & C2 IS EQUAL, THEN IT WILL TAKE ANY VALUE IN BETWEEN B2 & C2,BUT OTHER CONDITIONS REMAIN SAME.

RESULTED FIGURE MUST BE A ROUND FIGURE.

Pls help me Friends.

Thanks in advance.

Regards
RAMU
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Dear Friends,

Sorry, there was little mistake in the conditions, am modifying that


IF A2 =4500 & D2=4, THEN E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
IF A2 >4500 & D2>4, THEN E2 WILL BE (LOWER QTY IN BETWEEN B2 & C2)-(LOWER QTY IN BETWEEN B2 & C2*((D2-4)%))
IF A2 >4500 & D2<4, THEN E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
IF A2 <4500 & D2>4, THEN E2 WILL BE( (LOWER QTY IN BETWEEN B2 & C2/4500*A2)-(LOWER QTY IN BETWEEN B2 & C2*((D2-4)%)))
IF A2 <4500 & D2<4, THEN E2 WILL BE (LOWER QTY IN BETWEEN B2 & C2/4500*A2)

BUT IN CASE B2 & C2 IS EQUAL, THEN IT WILL TAKE ANY VALUE IN BETWEEN B2 & C2,BUT OTHER CONDITIONS REMAIN SAME.

RESULTED FIGURE MUST BE A ROUND FIGURE.

Pls pls help me friends.

Regards
RAMU
 
Upvote 0
What about the other possibilities?

A2 =4500 & D2 <4, A2 =4500 & D2 >4, A2 <4500 & D2 =4, A2 >4500 & D2 =4
 
Upvote 0
What about the other possibilities?

A2 =4500 & D2 <4, A2 =4500 & D2 >4, A2 <4500 & D2 =4, A2 >4500 & D2 =4

A2=4500 & D2<4 then E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
A2 =4500 & D2>4 then E2 WILL BE ((LOWER QTY IN BETWEEN B2 & C2)-(LOWER QTY IN BETWEEN B2 & C2*D2%))
A2 <4500 & D2 =4 THEN E2 WILL BE (LOWER QTY IN BETWEEN B2 & C2/4500)*A2
A2 >4500 & D2 =4 THEN E2 WILL BE LOWER QTY IN BETWEEN B2 & C2
 
Upvote 0
Dear Friends,

Pls help me.

Regards
RAMU
 
Upvote 0
Does D2 hold a % value (does it show the % symbol in the cell)?
 
Upvote 0
Dear Jason,

No, it shows only number like 1 or 3 or 10 etc.

Regards
RAMU
 
Upvote 0
Based on what you've asked for try

=ROUND(IF(D2<=4,IF(A2>=4500,MIN(B2:C2),MIN(B2:C2)/4500*A2),CHOOSE(SIGN(A2-4500)+2,(MIN(B2:C2)/4500*A2)-(MIN(B2:C2)*((D2-4)/100)),MIN(B2:C2)-(MIN(B2:C2)*(D2/100)),MIN(B2:C2)-(MIN(B2:C2)*((D2-4)/100)))),0)
 
Upvote 0
Dear Jason,

Perfect, it works fine. I just modified little bit bcoz I had to change the condition.
However, it works gr8.

But one thing, seriously I couldn't understand how it works..

Thanks
RAMU
 
Upvote 0
It works on process of elimintation, not really sure how to explain it to be honest,

I did miss some common factors in the results before, this should give the same results.

=ROUND(MIN(B2:B2)/4500*MIN(4500,A2)-IF(D2>4,MIN(B2:B2)/4500*MIN(4500,A2)*(C2-IF(A2<>4500,4))%),0)

Note that with the second part, a false result on D2>4 would subtract 0 from the first part, making it suitable for the criteria where there should be no subtraction.

Likewise /4500*min(4500,a2) would result in /4500*4500 where the result should just return the lower value, this means the result is unchanged.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top