sum every nth cell with additional criteria

rogowicz

New Member
Joined
Mar 19, 2010
Messages
2
I have a system generated table that displays sales data for products. Image below. It has a merged cell in the first row with a month/year, which has the quantity and sales dollars for that month. I want to consolidate this data by year rather than by each month.

I know how to sum every nth cell to get only the Qty or only the Amt =SUM(IF(MOD(ROW($B$1:$B$15),2)=0,$B$1:$B$15,0))

I know how to sumif based on date range (several ways to do this)

I do not know how to combine those two functions. I need this today if at all possible, but no expectations. Can anyone help?

FYI I have 300+ rows of data and 5 years that I want to consolidate.

21H9S17
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Control+shift+enter, not just enter:

=SUM(IF(MOD(ROW($B$1:$B$15)-ROW($B$1),2)=0,$B$1:$B$15))

will sum values from B1:B15 at every other row.


If the dates are in C1:C15 and they must equal say X1, a particular date...

Control+shift+enter, not just enter:

=SUM(IF(MOD(ROW($B$1:$B$15)-ROW($B$1),2)=0,IF($C$1:$C$15=X1,$B$1:$B$15)))
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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