Beautiful plan to use named ranges in tatters....excel crashes with error report

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
I have 3 named ranges. When I try to index them all fine...except ParameterTable. As soon as I type =INDEX(ParameterTable, .... excel unexpectedly stops with send error report rubbish etc

Here are the ranges :

ParameterClients =Parameters!$B$1:INDEX(Parameters!$1:$1,0,MAX((Parameters!$1:$1<>"")*(COLUMN(Parameters!$1:$1))))


ParameterFields =Parameters!$A$2:INDEX(Parameters!$A:$A,MAX((Parameters!$A:$A<>"")*(ROW(Parameters!$A:$A)),0))


ParameterTable =Parameters!$A$1:INDIRECT(ADDRESS(MAX(ROW(ParameterFields)),MAX(COLUMN(ParameterClients))))


When I explore using Name Manager, all fine, can select ranges etc no issues.
 

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.

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Although if I changes ParameterTable and omit the first ref Parameters!$A$1...I can then index it using the fomula :

=INDEX($A$1:ParameterTable, ...

?
 
Upvote 0

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Ah...think I have spotted the issue...not using 'Parameters'!

Fixed this but it still doesn't work!
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,344
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Which version of Excel are you using?
And why not just convert the range to an actual table?
 
Last edited:
Upvote 0

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Using Excel 2007

I will be using the table approach in the future (like the referencing method) but this project going to stick with dynamic

Does the workbook function correctly for you?
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,344
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
No it doesn't - looks like a bug. However, you can use:
=OFFSET(HEADERS,1,0,COUNTA(FIELDS))
as the range for TABLE.
 
Upvote 0

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Thanks RORYA, will try this method

Never like using COUNTA incase some idiot puts data in a weird place leaving gaps

Sheet protection time!
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,344
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Then why not use a table... :)
 
Upvote 0

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
I'll get back to you when I think of a good reason :)

No you are right, I will be converting all of my sheets to tables at some point, then re-format colours etc to keep the appearance the same

And get on-top of the Table referencing method.

Thanks for your help!
 
Upvote 0

Forum statistics

Threads
1,190,602
Messages
5,981,883
Members
439,742
Latest member
bluegreen

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