IF statement

jwgreen1986

Board Regular
Joined
Mar 8, 2019
Messages
64
hi, was wondering if someone could help. this is probably simple but has my head a bit messed.

basically i want to do a formula where if the values of two cells dont match something then sum 3 cells to give a total.

in one column i have account. and in the other i have department.
i want the formula to look in this and when the account is not equal to gross profit AND department is not equal to USED VEHICLES then add up 3 different cells to give a total.

the important part is the AND. i want other accounts of used vehicles to be calculated (units and F&I) but i do not want it to add any where the department and account equals gross profit and used vehicles.


similarly i want other departments of gross profits to be calculated (new vehicles etc)

so basically i want 3 cells adding up if the account cell AND department cell do not equal gross profit and used vehicles. it has to be both and not just one or the other.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi & welcome to MrExcel.
Something like
=IF(AND(A1<>"Gross profit",B1<>"Used vehicles"),SUM(C1:E1),"")
 
Upvote 0
Hi, I've read it differently - here is my take.

i do not want it to add any where the department and account equals gross profit and used vehicles.


Excel 2013/2016
ABCDEF
1accountdepartmentdifferent cell 1different cell 2different cell 3formula
2gross profitused vehicles9598310
3gross profitused vehicles7127120
4gross profitother7203663
5othera746166201
6abca21977107
7helloused vehicles431247102
8gross profitaa12132550
9gross profitused vehicles4090760
10gross profitklsa32313497
Sheet1
Cell Formulas
RangeFormula
F2=IF(AND(A2="gross profit",B2="used vehicles"),0,SUM(C2:E2))
 
Last edited:
Upvote 0
right i need to extend this further.
i have managed to calculate the 3 monthly totals based on the criteria above. i have then marked this against a target total and this gives how much of the target the person has hit in %.
what i need to do now is give the person a bonus based on this percentage. so the formula i need is like this

if account ="Gross Profit on F&I" OR Account = "Vehicle Units" AND Department = "Used Vehicles", IF difference <85,0, if difference =>85 BUT <95, but the value from a different cell on a different tab, if difference =>95 but <100, then but value from a difference cell, if difference =>100 but <110, then put value from different cell, if difference >=110 but < 120, then put value from a difference cell, if difference >120 then put value from different cell. i need to separate the Gross profit on F&I and the vehicle units as there are different rates for these. so basically i will need it to first look at the account column first and if this is Gross Profit on F&I and the department is Used Vehicles then do the formula, if account equals vehicle units and department is used vehicles then do the formula, if the account is anything other than one of these two then simply bring back 0.
 
Upvote 0
Hi, see if you can adapt something like this to your set-up.


Excel 2013/2016
ABCDEF
1Accountdepartmentdifferenceresultsdifferent cell 1
2Gross Profit on F&IUsed Vehicles840different cell 2
3Vehicle UnitsUsed Vehicles85different cell 1different cell 3
4Gross Profit on F&Iother5000different cell 4
5Vehicle UnitsUsed Vehicles95different cell 2different cell 5
6otherUsed Vehicles1000
7otherother1510
8Vehicle UnitsUsed Vehicles100different cell 3
9Gross Profit on F&IUsed Vehicles110different cell 4
10Vehicle UnitsUsed Vehicles120different cell 5
11Vehicle UnitsUsed Vehicles9999different cell 5
Sheet1
Cell Formulas
RangeFormula
D2=IF(AND(OR(A2={"Gross profit on f&I","vehicle units"}),B2="Used vehicles"),CHOOSE(MATCH(C2,{0,85,95,100,110,120}),0,$F$1,$F$2,$F$3,$F$4,$F$5),0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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