IF/AND SUM MULTIPLE CRITERIA

Claire Jackson

Board Regular
Joined
Jun 30, 2020
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hi, I am trying to do an if sum with and with 6 different criteria. Can you advise where I'm going wrong please:

=IF(AND(A2="matt jackson",69,b2="not on site",70, IF(AND(A2="andy campbell",79,b2="not on site",80,IF(and(A2="kelvin green",89,b2="not on site",90))))
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
could you write in words what exactly you are trying to do here?
 
Upvote 0
Can you post a sample of your data, along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I have two columns, A & B, if a = specific text and b = specific text then put in one number or another number.

Book1.xlsx
ABCD
1kelvin greenon site89
2matt jacksonnot on site70
3kelvin greenon site
4andy campbellon site
5kelvin greenon site
6matt jacksonnot on site
7andy campbellnot on site
8matt jacksonon site
9matt jacksonnot on site
10kelvin greenon site
11
12
13
14
15
16
17
18
19
20matt on site69
21matt not on site70
22
23andy campbell on site79
24andy campbell not on site80
25
26kelvin green on site89
27kelvin green not on site90
Sheet1
Cell Formulas
RangeFormula
C1C1=IF(A1="matt jackson",69,IF(A1="andy campbell",79,IF(A1="Kelvin Green",89,"none")))
C2C2=IF(AND(A2="matt jackson",69,"not on site",70),70,IF(AND(A2="andy campbell",79,"not on site",80),IF(AND(A2="kelvin green",79,"not on site",90),0)))
 
Upvote 0
Thanks for that, how about
+Fluff 1.xlsm
ABC
1
2kelvin greenon site89
3matt jacksonon site69
4kelvin greenon site89
5andy campbellon site79
6kelvin greenon site89
7matt jacksonnot on site70
8andy campbellnot on site80
9matt jacksonnot on site70
10matt jacksonnot on site70
11kelvin greennot on site90
Lists
Cell Formulas
RangeFormula
C2:C11C2=IF(A2="matt jackson",69+(B2="not on site"), IF(A2="andy campbell",79+(B2="not on site"),IF(A2="kelvin green",89+(B2="not on site"))))
 
Upvote 0
Sorry I haven't explained myself correctly:

If name is Matt Jackson and On Site then make it 69, if it's Matt Jackson and Not On Site then make it 70
If name is Andy Campbell and On Site then make it 79, if it's Andy Campbell and Not On Site then make it 80
If name is Kelvin Green and On Site then make it 89, if it's Kelvin Green and Not On Site then make it 90
 
Upvote 0
That's exactly what my suggestion does.
 
Upvote 0
Sorry my apologies again, I should have pasted it into the correct row. Yes, your suggestion is absolutely correct :) . Thanks again.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Thinking about it, as the criteria for col B is always the same we can slim that formula down like
Excel Formula:
=IF(A2="matt jackson",69,IF(A2="andy campbell",79,IF(A2="kelvin green",89)))+(B2="not on site")
 
Upvote 0

Forum statistics

Threads
1,215,684
Messages
6,126,199
Members
449,298
Latest member
Jest

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