SUMIFS formula

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
This formula works: =SUMIFS(Numbers!F5:F8,Numbers!E5:E8,ReportCalculator!B20) I realize it only has one criteria to look at, but I'm taking this one step at a time.

What I need to add to this is for it to look in Numbers!F4:G4 and look for the value in ReportCalculator!$B$2

When I change this formula =SUMIFS(Numbers!F5:F8,Numbers!E5:E8,ReportCalculator!B20) to this: =SUMIFS(Numbers!F5:F8,Numbers!E5:E8,ReportCalculator!B20,Numbers!F4:G4,ReportCalculator!B2) I get a #VALUE! error.

The value in B2 is a fliter value I can select a date from that needs to change the data in the cell I'm looking at based on it's value.

Any ideas? thanks in advance
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hey Rodney - any chance you can provide a screenshot or example?

It looks like you have misaligned range sizes - you're trying to lookup a value in a row for your second condition, but a value in a column for your first condition with your actual sum range just being a column.

If you're trying to lookup rows and columns, a better formula might be an =INDEX() formula using the =MATCH() formula to find the right rows and columns, or the use of =SUMPRODUCT() formula. There's a ton of info on the forum or on Google to help with either of these.
 
Upvote 0
I think you're right, one series is in a column and another in a row. Since I'm early in the creation of this, I'll try and switch one of them to see if that works. Otherwise, I'll look into Index but the key is it needs to trigger off the pivot table data. thanks for the direction.
 
Upvote 0
Try this:

varios 01mar2023.xlsm
AEFGHI
1
2
3
4zsxd
5a5312
6b62
7a74
8a85
Numbers
Cell Formulas
RangeFormula
I5I5=SUMPRODUCT((Numbers!E5:E8=ReportCalculator!B20)*(Numbers!F4:G4=ReportCalculator!B22)*(Numbers!F5:G8))


varios 01mar2023.xlsm
AB
1
19
20a
21
22xd
ReportCalculator
 
Upvote 0
I got it figured out. Gimics helped point me in the right direction. I simply needed to place all the data in columns and it worked perfectly. Thank you everyone for your input. This is what ended up working: =SUMIFS(Numbers!$F:$F,Numbers!$E:$E,ReportCalculator!$B20,Numbers!$D:$D,ReportCalculator!$B$2)
 
Upvote 0
Glad you got it sorted. (y)

As a matter of interest, what is the answer to my question?
 
Upvote 0
ReportCalculator
Thanks, I was suspecting an answer like that. :)
Can I suggest then that you change (shorten) your new formula to
Excel Formula:
=SUMIFS(Numbers!$F:$F,Numbers!$E:$E,$B20,Numbers!$D:$D,$B$2)

The reason is that it is not only unnecessary to use that worksheet name in the formula, but it can actually lead to incorrect formula results in some circumstances.
 
Upvote 0
Thanks, I was suspecting an answer like that. :)
Can I suggest then that you change (shorten) your new formula to
Excel Formula:
=SUMIFS(Numbers!$F:$F,Numbers!$E:$E,$B20,Numbers!$D:$D,$B$2)

The reason is that it is not only unnecessary to use that worksheet name in the formula, but it can actually lead to incorrect formula results in some circumstances.
Thanks for the knowledge.
 
Upvote 0

Forum statistics

Threads
1,214,895
Messages
6,122,128
Members
449,066
Latest member
Andyg666

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