Dynamic named range

scottylad2

Well-known Member
Joined
Feb 2, 2009
Messages
1,919
Hi everyone. I have a membership data base in Excel, and I've worked out how to do a mail merge using Word and the Names and addresses contained in my Excel file. As per the help file instructions, i've named the range where my names and addresses are contained, but next year my list could be bigger or smaller than this year, is there a way to have the named range dynamic to include only rows that contain data? Needs to be a formula, and has to be in Excel

my Column headers starting in A1:D1 are First name Last name Address Postcode and this year go to Row 1005, and i've named the range MyNa
es for the purposes of doing the renewal mailing

thanks
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Hi everyone. I have a membership data base in Excel, and I've worked out how to do a mail merge using Word and the Names and addresses contained in my Excel file. As per the help file instructions, i've named the range where my names and addresses are contained, but next year my list could be bigger or smaller than this year, is there a way to have the named range dynamic to include only rows that contain data? Needs to be a formula, and has to be in Excel

my Column headers starting in A1:D1 are First name Last name Address Postcode and this year go to Row 1005, and i've named the range MyNa
es for the purposes of doing the renewal mailing

thanks

I'll assume Sheet1 as the sheet where your database is located.

Define VSize as referring to:

=MATCH(REPT("z",255),Sheet1!$A:$A)-ROW(Sheet1!A$1)+1

Define HSize as referring to:

=COUNTIF(Sheet1!$A$1:$D$1,"?*")

Define (or re-define) MyNa as referring to:

=OFFSET(Sheet1!$A$2,0,0,VSize,HSize)
 

scottylad2

Well-known Member
Joined
Feb 2, 2009
Messages
1,919
On the same Data Base, i want a cell to always have the date 1/08/for the current year. Can that be done so i never have to manually update it? and in the cell next to that i want the same but always 1 year in front, I'm doing conditional formatting based on memberships due and having these dates hard coded into a cell will help.

thanks again

Cells will be G1 and H1
 

Forum statistics

Threads
1,176,345
Messages
5,902,623
Members
434,981
Latest member
sheils

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
Top