Forum Discussion
Rebecca Schneider
Oct 20, 2017Copper Contributor
formula that will return the sum of values with a given name in a given month
Trying to find a sumif formula that will return the sum of values with a given name in a given month. I have multiple entries within each month that are labeled to fit into a certain category and a ...
- Oct 24, 2017
Hi Rebecca
Bit of a long formula (I'd also encourage you to turn your 2 Data sets into Tables (Ctrl T) so that the formula is more meaningful.
=SUMIFS('Data 1'!$H:$H,'Data 1'!$E:$E,$A2,'Data 1'!$B:$B,">="&B$1,'Data 1'!$B:$B,"<="&EOMONTH(B$1,0))
+SUMIFS('Data 2'!$H:$H,'Data 2'!$E:$E,$A2,'Data 2'!$B:$B,">="&B$1,'Data 2'!$B:$B,"<="&EOMONTH(B$1,0))
Wyn Hopkins
Oct 21, 2017MVP
Hi
I think this may help (I'm only doing it to row 8 but hopefully you get the idea
=SUMIFS( $H$5:$H$8, $B$5:$B$8, ">="&B15, $B$5:$B$8,"<=" & C15, $E$5:$E$8, D15 )
If this isn't what you need could you upload a sample file.
Thanks
Wyn
Rebecca Schneider
Oct 23, 2017Copper Contributor
I have uploaded a sample document. The first tab is where I would want all the totals pulled into (from both sheets)
The second and third tabs are where the data is.
- Wyn HopkinsOct 24, 2017MVP
Hi Rebecca
Bit of a long formula (I'd also encourage you to turn your 2 Data sets into Tables (Ctrl T) so that the formula is more meaningful.
=SUMIFS('Data 1'!$H:$H,'Data 1'!$E:$E,$A2,'Data 1'!$B:$B,">="&B$1,'Data 1'!$B:$B,"<="&EOMONTH(B$1,0))
+SUMIFS('Data 2'!$H:$H,'Data 2'!$E:$E,$A2,'Data 2'!$B:$B,">="&B$1,'Data 2'!$B:$B,"<="&EOMONTH(B$1,0))- Rebecca SchneiderOct 25, 2017Copper ContributorThe first half of the sumifs statement worked - pulled correctly from sheet 1
=SUMIFS('Data 1'!$H:$H,'Data 1'!$E:$E,$A2,'Data 1'!$B:$B,">="&B$1,'Data 1'!$B:$B,"<="&EOMONTH(B$1,0))
When i include the second half it just gives me a zero, not pulling from sheet 2- Wyn HopkinsOct 26, 2017MVP
Hi Rebecca,
If you copy the whole formula (not 2 separate parts) it should work (assuming your columns are set up in the same way)
Also I've attached a version including Tables
- Rebecca SchneiderOct 25, 2017Copper Contributor
Thank you so much it worked!!! I can't even tell you how long i've been working on this formula. I turned my sheets that have the original data into tables, is that what you mean? How does that effect the formula? Sorry, im somewhat new to all of this.