Dynamic Named Range With 2 Columns

wsnyder

Board Regular
Joined
Sep 23, 2018
Messages
223
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to create a Dynamic Named Range from 2 Columns, but it keeps returning all columns

First I tried:
Excel Formula:
=Data!$U$8:INDEX(Data!$8:$1048576,COUNTA(Data!$U:$U),COUNTA(Data!$11:$11))

But returned too many columns, so I edited in Name Manager to this
Excel Formula:
=Data!$U$8:INDEX(Data!$8:$1048576,COUNTA(Data!$U:$U),COUNTA(Data!$U11:$V11))

Still returning more than 2 columns
I thought maybe because I edited the formula, so I just tried adding a new Dynamic Named Range?
No, still returning more than 2 columns.

What am I doing wrong here? Should just be $U:$V.

Thanks,
-w
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
If you want only 2 columns:

Excel Formula:
=Data!$U$8:INDEX(Data!V1:V1000000,COUNTA(Data!$U:$U),0)
 
Upvote 0
Thanks DanteAmor,

I updated my Dynamic Named Range based on your formula.
When I go to a new sheet in the workbook and type = nm_rng a spill array is returned with 17 columns
It seems to be picking up Columns A-Q, These columns are a mix of Pivot Tables, Blank Columns, and Formula Columns.
The last column in the Spill Array is Column U. Column V is not returned at all.

Thanks,
-w
 
Upvote 0
Hi

The $ was missing to make the range absolute.
Delete the name and create it new with the following:

Excel Formula:
=Data!$U$8:INDICE(Data!$V$1:$V$1000000,CONTARA(Data!$U:$U),0)
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,463
Members
449,163
Latest member
kshealy

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