svendiamond
Well-known Member
- Joined
- Jun 13, 2014
- Messages
- 1,504
- Office Version
- 365
- Platform
- Windows
Hello there! I have two questions.
1. Can I make a dynamic named range for a table? Not just one column?
2. Can I make the "Count" part not count the whole column? Because I have a row of "totals" I don't want to include in the range.
I want to name the range from A1:O13 -- I want to name it "WORKRANGE" -- so when I type my formula for the named range what would I type?Here's what I'm thinking: "=OFFSET(A1:O1,0,0,COUNT(A2:A13)) -- I'm not counting the entire column because I don't want it to include my "TOTALS" row. Is this going to work?
I have Macro buttons just to the right of this screenshot. These buttons SORT by various columns for this table. Sometimes I have to go in and add a row in, so my range would become A1:O14 -- and if I add another it'd be A1:O15. I want my dynamic range to adapt to me adding rows in (e.g. between rows 6 and 7 I add a new row.) This way, I can refer to my dynamic named range in my VBA for those macro buttons, instead of going in and updating them all to include an extra few rows every time I change something.
Any help is appreciated! Thanks!
Here's a picture:
1. Can I make a dynamic named range for a table? Not just one column?
2. Can I make the "Count" part not count the whole column? Because I have a row of "totals" I don't want to include in the range.
I want to name the range from A1:O13 -- I want to name it "WORKRANGE" -- so when I type my formula for the named range what would I type?Here's what I'm thinking: "=OFFSET(A1:O1,0,0,COUNT(A2:A13)) -- I'm not counting the entire column because I don't want it to include my "TOTALS" row. Is this going to work?
I have Macro buttons just to the right of this screenshot. These buttons SORT by various columns for this table. Sometimes I have to go in and add a row in, so my range would become A1:O14 -- and if I add another it'd be A1:O15. I want my dynamic range to adapt to me adding rows in (e.g. between rows 6 and 7 I add a new row.) This way, I can refer to my dynamic named range in my VBA for those macro buttons, instead of going in and updating them all to include an extra few rows every time I change something.
Any help is appreciated! Thanks!
Here's a picture: