• 408K Members
• 8,193 Online
• 464K Conversations
SOLVED

## Dynamic Named Range Failure

Occasional Contributor

# Dynamic Named Range Failure

I've created a workbook that will be used as a checkbook, made up of a tab for each month.  There are also categories for register entry.  There is also a summary tab that will pull info from each sheet into an income/expense statement.  That was built with a named range that included the tab names (Jan thru Feb), and the following formula:

=SUMPRODUCT(SUMIF(INDIRECT("'"&Months&"'!d9:d101"),\$D22,INDIRECT("'"&Months&"'!f9:f101")))

This formula works AWESOME, however, because the tabs are pre-populated with regular monthly expenditures, I wanted to find a way to automatically update the named range as each month passed.  that led me to a formula to create a Dynamic Named Range using this formula:

=OFFSET(SUMMARY!\$A7,1,0,COUNTA(SUMMARY!\$A:\$A)-1,1)

This is where I get a #REF! error.

HELP!?

8 Replies

# Re: Dynamic Named Range Failure

In general it works

Most probably you need to change second parameter in OFFSET on zero and don't deduct 1 from COUNTA. Last parameter is not required here.

# Re: Dynamic Named Range Failure

Could I upload 2 files and have you look at them?

# Re: Dynamic Named Range Failure

Yes, sure. Only bit later, I'll have a break right now.

Solution

# Re: Dynamic Named Range Failure

@Trisa58 , no problem.

In test file in the formula you started range from A8, actually it's from A1. In main file you have the cell with empty string below your months, thus COUNTA returned incorrect result. Since we have only twelve months in the year I'd recommend to limit the range accordingly, not use A:A. Finally the formula is

`=OFFSET(SUMMARY!\$A\$2,0,0,COUNTA(SUMMARY!\$A\$1:\$A\$13)-1,1)`

I corrected in both files. Please be carefull with relative and absolute references, here all are to be absolute.

# Re: Dynamic Named Range Failure

Thank you, I will check these out.

Again, I greatly appreciate all your help.  I've worked with Excel for years, but never any formal training on formulas.

# Re: Dynamic Named Range Failure

@Trisa58 , me too, never had any formal training.

Please inform if something doesn't work

# Re: Dynamic Named Range Failure

@Sergei Baklan

PERFECT!!!!  Thank you!

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies