"this sum" or "that sum" dependant on Criteria?

Bench

Board Regular
Joined
Aug 27, 2009
Messages
134
Hi,

I have two ways of working out profit depending on which company we send work to.

I would like to write a function that takes this into account and does the math either way. I'm thinking this may be a SUMPRODUCT but not entirely sure.

Example:

Column A=Company
Column B=Gross Fee
Column C=Their Fee
Column D=Profit

For Company B the math is simple B-C= Profit
For Company A the math is B-85, regardless of the figure in Column C

Is their way to do this, ie.

If A=Company A, Then D=B-85
If A=Company B, Then D=B-C

Thanks for your help
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

bprasad

Board Regular
Joined
May 31, 2008
Messages
111
If I understood correctly, this will do the trick
Code:
=IF(A1="A",B1-85,B1-C1)
where "A" is name of company
 

Watch MrExcel Video

Forum statistics

Threads
1,114,648
Messages
5,549,176
Members
410,903
Latest member
natesreich
Top