Named Range Error

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
Hello,can anyone tell me where I’m going wrong with this please…<o:p></o:p>
E33 isreturning the expected value when I use a named range called “Season13” whichis defined as =Sheet1!$CD$5:$CK$556<o:p></o:p>
<o:p></o:p>
However when I redefine "Season13" to =Sheet1!$CD$5:INDEX(Sheet1!$CK$5:$CK$556,Sheet1!$CD$2)where $CD$2 =552 I’m getting a #REF error… when I check this name in Insert/Namesthe “dancing ants are in the correct place which is really confusing me.<o:p></o:p>
<o:p></o:p>
What am I doing wrong please?<o:p></o:p>
<o:p></o:p>

<o:p> </o:p>

E<o:p></o:p>

33<o:p></o:p>

1 - 1<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>
Spreadsheet Formulas<o:p></o:p>

Cell<o:p></o:p>
Formula<o:p></o:p>
E33<o:p></o:p>
=IF(ISNA($B33),"",INDEX(INDIRECT("Season"&A33),$B33,4)&" - "&INDEX(INDIRECT("Season"&A33),$B33,5))<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>

<tbody>
</tbody>
<o:p></o:p>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try:
Code:
[FONT=Calibri][COLOR=#000000]=Sheet1!$CD$5[/COLOR][/FONT]&":"&[FONT=Calibri][COLOR=#000000]INDEX(Sheet1!$CK$5:$CK$556,Sheet1!$CD$2)[/COLOR][/FONT]
 
Upvote 0
The formula does not return a range directly. Since you are including a variable you'll probably need the indirect function.

Try defining the Name as =INDIRECT("Sheet1!$CD$5:$CK$"&Sheet1!$CD$2+4)
 
Upvote 0
No luck with those suggestions, has anyone else got any ideas please? Thanks for the help so far though...
 
Upvote 0
Hi

If you just select the area CD5 to CK556 when defining "Season13", as a named range, then you have the flexibility to make adjustments to extract the data.

The reason you are getting the #Ref error is because the result of "INDEX(Sheet1!$CK$5:$CK$556,Sheet1!$CD$2)" is a value and not an address.

hth
 
Upvote 0
If your data in column CD is contiguous (no blanks), for your named range you could use:
=OFFSET(Sheet1!$CD$5,,,COUNTA($CD:$CD))
 
Upvote 0
Hi Danerida...Your solution didn't work for me... <o:p></o:p>
<o:p> </o:p>
Defining"Season13" as=Sheet1!$CD$5:OFFSET(Sheet1!$CD$5,,7,COUNTA(Sheet1!$CK:$CK)) or =Sheet1!$CD$5:INDEX(Sheet1!$CK$5:$CK$556,Sheet1!$CD$2)where $CD$2 =552 highlights the correct range when checking in the name manager but both return a #REF error to my formula... <o:p></o:p>
<o:p> </o:p>
ukmikeb must beright, these formulas are returning a value not a cell address. Defining Season13 as =Sheet1!$CD$5:$CK$556 isthe only formula that is working.<o:p></o:p>
 
Upvote 0
Indirect doesn't work with dynamic ranges, only literal addresses.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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