Index Function

Martel

New Member
Joined
Jun 19, 2019
Messages
26
Hi. Can anyone please quickly provide an alternative formula to create a dynamic named range which will use the index function as opposed to offset or indirect. Sorry, can't get my head round this one.

I have :

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=OFFSET(Demographics!$C$2,0,0,COUNTA(Demographics!$H:$H)-1,29)[/FONT]

This captures all used rows, using column H (-1 for headers) and as many columns as specified in last parameter (29)

I would like :

=demographics!$c$2:index..... etc etc. I am stuck at this point.

Thanks in advance. Martel
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I assume H contains text because Martel used COUNTA instead of COUNT. Given that, then maybe:

=Demographics!$C$2:INDEX(Demographics!$AE:$AE,LOOKUP("zzzzzzzzzz",Demographics!$H:$H,ROW(Demographics!$H:$H)))

I'm not sure why you want to get rid of OFFSET. If you're trying to avoid volatile functions, I don't think you'll see a significant performance increase. OFFSET is pretty fast.
 
Upvote 0
Maybe...

=Demographics!$C$2:INDEX(INDEX(Demographics!$C:$ZZ,0,29),COUNTA(Demographics!$H:$H)-1)

M.
 
Upvote 0
Hi and thanks. Offset reportedly causing #Ref errors when deleting rows in dynamic range names. I have been getting this problem regularly so thought I would give index a go. Speed not important just looking for something that works reliably. I will give your suggestion a go and get back. Thanks again. Martel
 
Upvote 0
To M , Eric et al. Plenty of responses to try for which many thanks to all. No early night for me...... ciao all
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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