how to make my array formula dynamic

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows
INDEX(Sheet2!$L$3:$L$20000,SMALL(IF(FREQUENCY(IF(Sheet2!$K$3:$K$20000=$B2,Sheet2!$L$3:$L$20000),Sheet2!$L$3:$L$20000),ROW(Sheet2!$L$3:$L$20000)-ROW(Sheet2!$L$3)+1),1))

I have a workbook with two sheets.
Sheet 1 has the above formula which points to Sheet 2.
Sheet 2 is where I paste my data.

I update my data everyday.
Notice that the row range is from row 3 to row 20000
Suppose I paste new data and the rows in Sheet 2 extend to row 40000.

Is there a way for the formula to update automatically to say, for example, L3:L20000 where ever underlined?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Thanks Scott,

Tried the below
but it's causing a lot of lag to my workbook (several tens of thousands of rows) as OFFSET is a volatile function.
Will look for another way to do dynamic name range.
ColumnK =OFFSET(Sheet2!$K$2,,,COUNTA(Sheet2!$K:$K)-1)[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
ColumnL =OFFSET(Sheet2!$L$2,,,COUNTA(Sheet2!$L:$L)-1)
[/FONT]

=INDEX(ColumnL,SMALL(IF(FREQUENCY(IF(ColumnK=$B2,ColumnL),ColumnL),ROW(ColumnL)-ROW(Sheet2!$L$3)+1),1))


 
Upvote 0

Forum statistics

Threads
1,224,737
Messages
6,180,657
Members
452,992
Latest member
TokugawaIesuma

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