Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7656991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:54:39+00:00 2026-05-31T12:54:39+00:00

Hi, I’ve got a slightly complicated setup of data ranges, which arrive in Excel

  • 0

Hi, I’ve got a slightly complicated setup of data ranges, which arrive in Excel (Version 2003) by XML/Soap and are manipulated by VBA. The result is shown in multiple ListBoxes on various sheets. The main data sheet is codenamed “shData”, the sheet name is “Data” (quite ingenuiously so far, hm?) and contains about 200 different ranges of data. One of the display pages is called Setup or shSetup.
A Data range in Data could look like this:

ID    Last    First    Group           
1     Dwyer   Barb     A
2     King    Fu       A
3     Rea     Di A.    C

Let’s say the range is named locally as “Data!Day0_Users”.

Another range, say “Data!Day1_Users” could be just the header (if there is no data):

ID    Last    First    Group

These ranges get inserted to or deleted from and resized from within VBA, so I need a flexible referencing mechanism.
Now, the ListBoxes can use a named range as the ListFillRange. For that, I define a local name in Setup, which references the one in data but uses an offset to exclude the header row: shSetup name “lbSomeListbox”, refers to OFFSET(Data!Day0_Users, 1, , ROWS(Data!Day0_Users)-1)
So far, so good. Obviously, when the range in Data is empty like in “Data!Day1_Users” in my example, such reference would generate an error. In such a case I would like to replace the reference with an empty array (which is defined as “Setup!EmptyRange5Col”, which in turn is again an offset reference to Data!EmptyRange5Col to only return the “-” part.

Empty Empty   Empty    Empty
-     -       -        -

I have now tried to define my local range as a name using excels error control mechanism, but it does not work – the following should use the offset’ed data or replace it with my empty array.

=IF(ISERROR(OFFSET(Data!Day0_Users, 1, , ROWS(Data!Day0_Users)-1)), Setup!EmptyRange5Col, OFFSET(Data!Day0_Users, 1, , ROWS(Data!Day0_Users)-1))

If I use the same formula (I’ve also tried several other variations) on the worksheet itself using =ISREF(IF(IsError…..), it always evaluates to true; trying the ISERROR alone always evaluates false, all as would be expected.
But as soon as I put it into the definition of the name the reference does not work, calls to shSetup.Names(…).RefersToRange produce runtime errors etc.

Does Excel have undocumented limitations on the use of formulas for names or am I being stupid? I’ve been looking at this for about 2 hours now and can’t see the light. I’d really appreciate if you could push me in the right direction.

Thanks in advance,
Stefan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:54:41+00:00Added an answer on May 31, 2026 at 12:54 pm

    Sorry, I’d like to withdraw my question…
    Even though an invalid reference from OFFSET() would return #REF which is included in the check with ISERROR(), doing so does not work. This here works as expected for the ReferTo Part of my Named Range:

    =IF(ISREF(OFFSET(Data!Day0_Users, 1, 0, ROWS(Data!Day0_Users)-1)), OFFSET(Data!Day0_Users, 1, 0, ROWS(Data!Day0_Users)-1), Setup!EmptyRange5Col)
    

    Sorry for the question – I needed some sleep, I think.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
In my XML file chapters tag has more chapter tag.i need to display chapters
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.