SUMPRODUCT(OFFSET(COLUMN)) help

Spiky

Board Regular
Joined
Jun 22, 2007
Messages
81
Aaarrggghhh....I seldom ask for help, but this one has me stumped.

I have a SUMPRODUCT formula that doesn't like me.

Works:
=SUMPRODUCT(--(LEFT('Sheet1'!$B$8:$B$63,4)="60-1"),OFFSET('Sheet1'!$B$8:$B$63,0,7))

Does not work:
=SUMPRODUCT(--(LEFT('Sheet1'!$B$8:$B$63,4)="60-1"),OFFSET('Sheet1'!$B$8:$B$63,0,COLUMN()*4-1))

Can anybody help? The COLUMN calc correctly calculates the number, 7 since this formula is in column B, but the rest of the formula then fails with a #VALUE! error because the OFFSET only returns one result instead of an array of 56 results. If I calculate (with F9) the COLUMN function area, it returns {7} rather than just 7. So, does that mean the array nature of SUMPRODUCT breaks the COLUMN function? Hmmm.....
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
As you've discovered, COLUMN() returns a single element array, which SUMPRODUCT cannot handle in its present syntax. Try applying MIN to COLUMN to return a scalar value...

=SUMPRODUCT(--(LEFT(Sheet1!$B$8:$B$63,4)="60-1"),OFFSET(Sheet1!$B$8:$B$63,0,MIN(COLUMN())*4-1))
 
Upvote 0
Awesome. People here think I know everything about Excel. I prove to myself daily that I don't.

Thanks, works perfectly.
 
Upvote 0

Forum statistics

Threads
1,215,008
Messages
6,122,672
Members
449,091
Latest member
peppernaut

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