Excel 2016 Dynamic Name Range to Include 2 columns


I have a named range in Excel called DC01 and it contains 2 columns.  The columns could contain a 100 rows one week and 5 rows the next.  Because the size of the range changes each week I want to make the range dynamic.  I am using the following formula:


This does not include the second column.

Could someone help me with this formula so both columns are dynamically named?

Sonia BowditchInformation Security OfficerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Roy CoxGroup Finance ManagerCommented:
It would be simpler and more efficient to convert the data to a Table

Overview of Excel tables

There's lots of Dynamic Named Range examples and explanations here, but I would definitely try a Table
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
All you need is to specify the width argument in the Offset formula which is currently set to 1.

NorieAnalyst Assistant Commented:
Try this.

='DC01'!$A$1:INDEX('DC01'!$B:$B, COUNTA('DC01'!$B:$B))
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Actually the fourth argument seems wrong, sorry I didn't pay attention to it.
Should be this...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rob HensonFinance AnalystCommented:
Will the number of values in the two columns be the same? If not you will need to determine the Max number of entries for the two columns.


Doing the count of A1:B200 as you were will only affect the height rather than the width of the dynamic range. If the columns do both have the same entries it will just double the height.
Rob HensonFinance AnalystCommented:
Then again, if the two columns are going to be different that raises another issue. If there are blanks within both columns but in different places, the count will produce the wrong value for the last row of data.

My suggestion above still won't give the correct result.
Sonia BowditchInformation Security OfficerAuthor Commented:
Thank you very much for your help.  All suggestions work perfectly.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Sonia!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.