"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
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If I understood correctly, this will do the trick
Code:
=IF(A1="A",B1-85,B1-C1)
where "A" is name of company
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,499
Members
449,089
Latest member
Raviguru

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