Dynamic Named Range exclude last row

alexx579

New Member
Joined
Aug 19, 2014
Messages
44
Hi all,

I have a data set as follows:

Data Headers A1: U1

Data: A2:U395

The number of rows in the data changes every month, and so I have a dynamic named range I want to use (formula below) which exclude the last non-blank cell in the column. The problem is I need to apply it to the whole range of data!! Can anyone help me??

=Data!$A$2: INDEX(Data!$A:$A,MATCH(1,1/(Data!$A$1:$A$1000=""),0)-1)

Thank You :))))

 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If Column A contains text values, try...

Code:
=Data!$A$2:INDEX(Data!$A:$U,MATCH(REPT("z",255),Data!$A:$A,1)-1,COLUMNS(Data!$A:$U))

or

Code:
=Data!$A$2:INDEX(Data!$A:$U,MATCH(REPT("z",255),Data!$A:$A,1)-1,0)

If Column A contains numerical values, replace REPT("z",255) with 9.99999999999999E+307.

Hope this helps!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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