porter2059

New Member
Joined
Apr 5, 2018
Messages
6
is there a way to embed an "and statement" inside a sumif statement so that it sumifs based on the combination of 2 criteria? or is there a better way to do it?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the board.

Are you looking for the SUMIFS function?

=SUMIFS(sum_range,crit1_range,"criteria1",crit2_range,"criteria2")

There are more options, but if you need something specific, you'll need to provide sample data.
 
Upvote 0
Thanks Eric. it seems like the SUMIFS should work but it isn't. i can't figure out how to attach a file or a pic of the file here for you to see.
 
Upvote 0
You can use the HTML Maker in my signature. Or you can upload a picture of your workbook to a file sharing site such as Dropbox, then post a link to the picture. You can even upload your workbook to such a site and post a link, but many people will not open files from the internet for security reasons. Finally, when posting, you can click the "Go Advanced" button in the bottom right. That will open a larger toolbar, including a table tool. You can manually create a table showing your data and expected results. Somewhat tedious, but if your example isn't too large, it could work.
 
Upvote 0
Ok, I got the formula to work if I put my criteria1 and criteria2 in quotes. ie "assisted living - town" but I'm trying to use a cell reference for the criteria1 and criteria 2. should the cellular reference be a6, =a6, "a6", "=a6"?
 
Upvote 0



A
B
C
D
E
I
J
K
1
Amount
town
Memo
Net
Direct
2
1
Town A
Direct
Town A
3
2
Town B
Net
Town B
4
3
Town A
Net
5
4
Town B
Direct
6
5
Town A
Direct
7
8
9
10

<tbody>
</tbody>

in cell j2 i put SUMIFS(B2:B6,D2:D6,"Town A", E2:E,"Net") then it will work but i want to use I2 instead of "Town A" or J1 instead of "Net" then it won't work
 
Upvote 0
Glad you sussed it out! As you probably figured out, by using the appropriate relative and absolute references in your formula, you can put the formula in J2 and then copy it to the rest of your table, without having to change it for each cell. I think this:

=SUMIFS($B$2:$B$6,$D$2:$D$6,$I2,$E$2:$E$6,J$2)

is probably what you came up with. Glad I could help!
:)
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,111
Members
449,205
Latest member
ralemanygarcia

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