vlookup? Index? to sum rows?

handysmurf

Board Regular
Joined
Jan 17, 2015
Messages
114
Office Version
  1. 365
Platform
  1. Windows
OK lets see if I can give the relevant details or close enough to work ...

I have a spreadsheet in which I sum information daily. On the row for day end there is a cell in which I enter a D. I also sum week ending, designated with "WE" in that cell. Also, Monthly designated by "M" and finally Yearly designated by "A".

The number of rows for each day varies and at the moment I have to do a find/replace on each summary row for the rows to sum. For daily the top row changes. for the others each row summed changes. So I can't sum any by a regular number of rows.

Usually the only constant is that some dailys have a week ending, monthly, and annual summary rows following. (the constant being that 95%+ fo the time WE, M, and A will be in rows directly beneath each other)

I would like to do a lookup or index ... or whatever formula command would work best, to get it to find the rows that need to be summed. In the case of the Daily find the top row, WE sum the daily rows for that week, Monthly to sum the WE rows for that month, and annual to sum the Monthly rows for that year.

Thanks in advance....
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
This will work for your example:

=SUMPRODUCT(--(ROW($A$1:A6)>LOOKUP(2,1/($C$1:C6="D"),ROW($C$1:C6))),--(ISNUMBER($B$1:B6)),$A$1:A6)
 
Upvote 0
OK I'm off to work for the weekend ... will try when I return on Tuesday

Thanks and I will let you know.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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