Array adjusting location by a variable

Calgary_Neil

Board Regular
Joined
Apr 5, 2014
Messages
79
I'm trying to get a formula that will check an array of 8 cells for "Y", and if true sum the adjacent (-1) cells, and move the arrays X*7 columns over.
A static formula that works is SUMIF( X2:X9, "=Y", W2:W9) = 15 where the X is 4 (7*4-5). The problem with this formula it doesn't adjust when a new group of 7 is placed at the end (ie AY) extending the range.
Using Offset is dynamic which I'm trying to avoid.

Demo.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAY
11234567
210Y101520202030
320202525252020Y
4202030252510Y10
5202030Y30302525
61515Y1515151515
7202025252500
815151515Y1500
92020252525Y00
Sheet2
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You are describing something that seems to suit OFFSET, so please explain in detail why that is to be avoided?
 
Upvote 0
Offset, Indirect, a few others are dynamic and are coded to solve each time the user presses enter (or so I understand). To many can really slow a sheet down, so I just avoid them in production work.
 
Upvote 0
I am currently using offset for this problem. I don’t work in arrays much, so I really don’t know how to create them without it.
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=LET(c,LOOKUP(2,1/(B1:ZZ1<>""),COLUMN(B1:ZZ1))-22,SUMIFS(INDEX(B2:ZZ9,,c),INDEX(B2:ZZ9,,c+1),"y"))
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,313
Members
453,032
Latest member
Pauh

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