Should it be Sumproduct with Offset?

George J

Well-known Member
Joined
Feb 15, 2002
Messages
959
I have a report over 2 sheets in a workbook.
A summary page and a data page.

This would be easier if I was allowed to write code for it, but as they will be sending it to clients, it must be formulas.

I am trying to put a subtotal on the summary page.
I am trying to lookup "Agreed" in column E of the Data page and wherever that is found, 5 rows above is a value I need, but I need to add all the Agreed offset 5 values together.

For another subtotal I need the lookup "Removed" in column E and "NOT" in column D and 5 rows above in column D, I need to total all of these values. There are around 500 entries on the Data sheet so goes over 2500 rows.

I initially tried sumproduct(--('Data'!E:E="Agreed")* indirect( row( and other variations, trying to subtract the number of rows. I also don't think offset is what I am looking for.

Has anyone done anything similar before?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Maybe use sumifs with an offset -

=SUMIFS(G2:G25,G7:G30,"Agreed")

Code:
[TABLE="width: 174"]
<colgroup><col width="87" span="2" style="width: 65pt;"></colgroup><tbody>[TR]
[TD="width: 87, align: right"]55[/TD]
[TD="width: 87, align: right"]154[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]44[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]agreed[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]agreed[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]55[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]agreed[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
You Sir (Gaz) are a sneaky genius!!!

Seems to work for the Agreed - just need to try the the Not Removed now.

Many many thanks.


Both of you had the same great idea. I was too busy thinking how to look up and offset I didn't think about the various summing options.

thank you!
 
Last edited:
Upvote 0
You're welcome, works the same with other columns, just keep the sum range offset.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

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