Link to home
Start Free TrialLog in
Avatar of LUIS FREUND
LUIS FREUND

asked on

Calculating a value based on another cell.

Calculating a value based on another cell.


On Column M,  the calculation should be as follows:

I'll use rows 27 and 14 as my example.  

If J27 is less than E27, then multiple J27 *K27 to get the value.

and/or

If  J14 is greater than E14, then multiple E14 * K14 to get value.

See attachment.
C--Users-lfreund-Downloads-COST4.xlsx
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

What should the value in column M be if J27 is equal to E27? If greater than E27?
The general formula to use is:
=IF(J27 < E27, J27*K27, <your else/false part here>)

Open in new window

If you need a third value then the formula looks like this:
=IF(J27 < E27, J27*K27, IF(J27 = E27, <your equals part here>, <your greater than part here>))

Open in new window

Avatar of LUIS FREUND
LUIS FREUND

ASKER

Ah yes....forgot to include that.

If J27 and E27 is equal then it's J27 * K27.

What's the whole formula for this?  Many Thanks!
Based on the criteria you've given, you want the two numbers to be multiplied any time they aren't equal.  This will give you the result you want, just replace A1 and B1 as appropriate.

=IF(A1<>B1, (A1*B1), "Equal")

EDIT:
Based on your followup comment, you simply want the two numbers multiplied every time, so
=(A1*B1)
So the formula would be:
=IF(J27 <= E27, J27*K27, E27 * K27)

Open in new window

EDIT again:
Are you asking how test different conditions?
=IF(A5>B5, "A", IF(A5<B5,"B", "Equal"))
Hi Shaun,  Thanks but after applying your formula I got some that are not adding up.  Those are highlighted in red, the green ones are good.  See attachment.
C--Users-lfreund-Downloads-COST4.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Shums Faruk
Shums Faruk
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much Shums, Paul and Shaun.  

Am I missing something when closing?  In the past I was able to award points but It doesn't give me that option anymore.