Results 1 to 7 of 7

Thread: Referencing Drop-down list error #n/a

  1. #1
    New Member
    Join Date
    Sep 2016
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Referencing Drop-down list error #n/a

    Hello,
    I have a multi-sheet workbook and I am having problems with a cell in sheet 1 that references another cell in sheet 2. That second cell is populated by means of a drop-down list and I’m sure that’s where my problem lies but I don’t know how to fix it. I keep getting the #N/A error.
    Here’s the breakdown of the sheets and cells involved.

    Sheet 1 named “Days”
    Sheet 2, named “PrimaryHistory”
    Sheet 3, named “Lists” (This sheet contains all the various drop down lists used throughout my workbook)

    This is my problem formula in Sheet “Days”, cell F12:
    =INDEX(PrimaryHistory!$B:$B,MATCH(9.99999999999999E+307,PrimaryHistory!$B:$B))

    • Where F12 should be the last populated cell from "PrimaryHistory" column B
    • Where “PrimaryHistory” column B is populated by means of a drop down list of names from a list on sheet “Lists”.


    I’ve tried creating the list off to the side within the “PrimaryHistory” sheet but I still have the same error. So what do I need to add to my formula to get it to give me the proper text?

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,177
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    How about
    =INDEX(Pcode!$B:$B,MATCH("ZZZZZZ",Pcode!$B:$B))
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,590
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    If PrimaryHistory!B:B has only text-filled cells, your formula will return #N/A b/c its looking for the last cell with a number in it. Fluff's formula will provide the value in the last cell filled with text.

    Here's an alternative that will find the value in the last filled cell regardless of whether it contains text or a number.

    =LOOKUP(2,1/(PrimaryHistory!$B:$B<>0),PrimaryHistory!$B:$B)
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

  4. #4
    New Member
    Join Date
    Sep 2016
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    Once I changed "Pcode!" to "PrimaryHistory!", that did it! Thanks!!!

  5. #5
    New Member
    Join Date
    Sep 2016
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    Joe,
    Thanks for the explanation! I was wondering but was too embarrassed to ask for the why's and how's.

  6. #6
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,177
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    Quote Originally Posted by applefritter View Post
    Once I changed "Pcode!" to "PrimaryHistory!", that did it! Thanks!!!
    You're welcome & thanks for the feedback.

    Apologies for not correcting the sheet name.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  7. #7
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,590
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    9 Thread(s)

    Default Re: Referencing Drop-down list error #n/a

    Quote Originally Posted by applefritter View Post
    Joe,
    Thanks for the explanation! I was wondering but was too embarrassed to ask for the why's and how's.
    You are welcome - thanks for the reply.
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •