"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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

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,109,501
Messages
5,529,234
Members
409,857
Latest member
KailuaTown
Top