Dynamic named ranges

already

Board Regular
Joined
Nov 11, 2008
Messages
179
Hello

With this formula I can make a range dynamic for 1 column on the same sheet

=OFFSET($A$1,0,0,COUNTA($A:$A),1)

What is the formula if I need to expand the range A1:D1 from another
worksheet in the same workbook?

Thanks in advance for your help

Al
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
The fifth argument of OFFSET specifies the number of colums, so
=OFFSET(Sheet2!$A$1, 0, 0, COUNTA(Sheet2!$A:$A), 4)
is the same as
=OFFSET(Sheet2!$A$1:$D$1, 0, 0, COUNTA(Sheet2!$A:$A), 4)

One issue might be if column A had fewer cells than columns B,C or D. In which case
MAX(COUNTA(Sheet2!$B:$B), COUNTA(Sheet2!$A:$A), COUNTA(Sheet2!$C:$C), COUNTA(Sheet2!$D:$D))
would be used for the row count argument.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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