Replace INDIRECT and ADDRESS with INDEX

dejhantulip

Board Regular
Joined
Sep 9, 2015
Messages
58
Office Version
  1. 365
Platform
  1. Windows
Hello community!

I need a little help with replacing an INDIRECT and ADDRESS functions combination with INDEX (which I believe would be a better suited and faster alternative... other alternatives are also welcomed!)

So I have the following:

ymOqxTA.png


Basically I am trying to fill up with an array of numbers Column C. The formula is basically grabbing the address of P71 (start of range I would like the array to fill up) and then using the MAX function to grab the last row number that is non-blank in Column U. This basically gives me the "range" I am trying to create for the array.

The result outputs a "1" times the row number in order to create an array of unique non-zero numbers whenever the "ACTIVIDAD:" text is found.

Thank you so much in advance for any help :)


ORLANDO
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Maybe this in place of the entire INDIRECT section, P71:INDEX(U:U,MATCH(1e+100,U:U))

Not sure if that is what is needed but it's best guess from a screen capture, I'm not going to retype everything to test it.
 
Upvote 0
Not very sure of what you are looking for, but I got this:
Mr Excel Playground 3.xlsm
CDEFGHIJKLMNOPQRSTU
7171ACTIVIDAD:
720CANTIDAD:x
730UNIDAD:x
740MONEDA:x
7575ACTIVIDAD:
760CANTIDAD:
7777ACTIVIDAD:
780CANTIDAD:x
790UNIDAD:
8080ACTIVIDAD:
8181ACTIVIDAD:x
820CANTIDAD:
83UNIDAD:x
84ACTIVIDAD:
85CANTIDAD:
86UNIDAD:
Sheet18
Cell Formulas
RangeFormula
C71:C82C71=SEQUENCE(MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71),1,ROW(P71))*IF(INDEX(P71:P999,SEQUENCE(MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71)),1)="ACTIVIDAD:",1,0)
Dynamic array formulas.
 
Upvote 0
Not very sure of what you are looking for, but I got this:
Mr Excel Playground 3.xlsm
CDEFGHIJKLMNOPQRSTU
7171ACTIVIDAD:
720CANTIDAD:x
730UNIDAD:x
740MONEDA:x
7575ACTIVIDAD:
760CANTIDAD:
7777ACTIVIDAD:
780CANTIDAD:x
790UNIDAD:
8080ACTIVIDAD:
8181ACTIVIDAD:x
820CANTIDAD:
83UNIDAD:x
84ACTIVIDAD:
85CANTIDAD:
86UNIDAD:
Sheet18
Cell Formulas
RangeFormula
C71:C82C71=SEQUENCE(MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71),1,ROW(P71))*IF(INDEX(P71:P999,SEQUENCE(MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71)),1)="ACTIVIDAD:",1,0)
Dynamic array formulas.
Thank you very much! :)
 
Upvote 0
As per our conversation dear James, I am posting a little follow up... Thank you sir!

EvWZQbz.png


So now I am trying to achieve a multiplication of the dynamic array of E71# with each row that has a number in S column starting at S71 and I am making this resulting array as big as the array in C71# (which by the way has the same number of rows of E71#).

Thank you greatly for any help :)
 
Upvote 0
Not sure how you are calculating col E - but as long as the size of the array is consistent with C, then this aught to do. I also made a small change to Col C - I think it was missing the last row sometimes.

Mr Excel Playground 3.xlsm
CDEFGHIJKLMNOPQRSTU
717116ACTIVIDAD:6
72010CANTIDAD:x
73014UNIDAD:4x
74010MONEDA:x
757510ACTIVIDAD:
76015CANTIDAD:5
777715ACTIVIDAD:5
78010CANTIDAD:x
790110UNIDAD:10
8080110ACTIVIDAD:10
818110ACTIVIDAD:x
82010CANTIDAD:
830115UNIDAD:15x
84ACTIVIDAD:
85CANTIDAD:15
86UNIDAD:
Sheet18
Cell Formulas
RangeFormula
C71:C83C71=SEQUENCE(1+MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71),1,ROW(P71))*IF(INDEX(P71:P999,SEQUENCE(1+MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71)),1)="ACTIVIDAD:",1,0)
E71:E83E71=C71#*0+1
F71:F83F71=INDEX(S71:S336,SEQUENCE(1+MAX(IF(ISBLANK(U:U),0,ROW(U:U)))-ROW(P71),1),1)*E71#
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,724
Messages
6,126,493
Members
449,316
Latest member
sravya

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