Jeffrey Mahoney
Well-known Member
- Joined
- May 31, 2015
- Messages
- 3,142
- Office Version
- 365
- Platform
- Windows
This may be hard to describe. I need opinions. I have created a Named range Lambda formula that accepts 2 parameters to create a dynamic range with varying rows. It works.
=LAMBDA(FullRange,MaxCol,LET(ANCHOR,INDEX(FullRange,1,1),MAXRNG,INDEX(FullRange,,MaxCol),ANCHOR:INDEX(FullRange,MAX((MAXRNG<>"")*ROW(MAXRNG))-ROW(ANCHOR)+1,)))
I know, I know, it's kind of wieldy.
You give it the full range starting at your top most row including all the columns you want but specify many more rows that you ever expect. You also provide the column that you want to calculate the last row in the set. It calculates the top left anchor cell; the last non-empty cell in the column you provide; and returns the dynamic range based on the number of rows.
I named it DynamicRange and it gets called like: DynamicRange($A$6:$AN$1000,1). I usually only have about 400 rows of data in this set and column 1 has the project IDs in it.
My questions are:
* Do you think that calling this one named range Lambda will be a bottle neck and slow things down?
* How would I go about calculating this potential slowness?
Jeff
=LAMBDA(FullRange,MaxCol,LET(ANCHOR,INDEX(FullRange,1,1),MAXRNG,INDEX(FullRange,,MaxCol),ANCHOR:INDEX(FullRange,MAX((MAXRNG<>"")*ROW(MAXRNG))-ROW(ANCHOR)+1,)))
I know, I know, it's kind of wieldy.
You give it the full range starting at your top most row including all the columns you want but specify many more rows that you ever expect. You also provide the column that you want to calculate the last row in the set. It calculates the top left anchor cell; the last non-empty cell in the column you provide; and returns the dynamic range based on the number of rows.
I named it DynamicRange and it gets called like: DynamicRange($A$6:$AN$1000,1). I usually only have about 400 rows of data in this set and column 1 has the project IDs in it.
My questions are:
* Do you think that calling this one named range Lambda will be a bottle neck and slow things down?
* How would I go about calculating this potential slowness?
Jeff