+ Reply to Thread
Results 1 to 8 of 8

Lookup #N/A Error

  1. #1
    Registered User
    Join Date
    09-01-2011
    Location
    Blacksburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Lookup #N/A Error

    I am dealing with a large amount of data that comes to me in a specific format from my instrument. Without too many details, I am writing a spreadsheet that I can copy and paste the data (directly from the instrument) into and automatically perform an analysis of variance.

    The data from the instrument is formatted in vertical columns, with each column being a different set and ~200 sets of data per run (the entire run is pasted into my sheet). In another sheet, where the ANOVA is being performed, each ANOVA has a cell next to it which is set equal to one of the cells across the row identifying each column of data. I am then using this cell for the LOOKUP function to pull the data into the ANOVA. For only one of the columns, every lookup returns an #N/A error. It is the same column regardless of the order (A-Z or not). If I remove the space in the middle of the column name, it then pulls the values correctly. However, every other column has a space in the middle of its name and they work. It isn't efficient for me to have to change the name of this column for each run. Does anyone have any idea why this lookup won't work (I can paste some dummy data if need be)?

    I appreciate any help.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Lookup #N/A Error

    Post a dummy workbook that shows the failure.

  3. #3
    Registered User
    Join Date
    09-01-2011
    Location
    Blacksburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Lookup #N/A Error

    anova test.xlsx

    There's a dummy, kind of cut down but the error still shows itself.

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Lookup #N/A Error

    The data in lookup_vector for the LOOKUP must be in order yours isn't.

    You could either use

    =LOOKUP($F4,Data!C1:D1,Data!C14:D14)

    or

    =INDEX(Data!C14:D14,MATCH($F4,Data!C1:D1,0))

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Lookup #N/A Error

    remove the word Type from B1 on the data sheet. LOOKUP expects sorted data.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    09-01-2011
    Location
    Blacksburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Lookup #N/A Error

    Both of these make sense... but my question now is, why does it work for every other column when all 200 of them are there? Ag 243.779 is the only one that it doesn't work for, even if it is somewhere in the middle of all of the columns.

    EDIT: Also, A1 normally has 'Sample' in it, but the data sorts properly without 'Type' in B1 yet with 'Sample' still in A1. Why is this? At this point, the problem is fixed but I'm just looking for an answer to better understand how it works for my own future reference.
    Last edited by hokiedrum; 05-14-2012 at 09:47 AM.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Lookup #N/A Error

    it's down to the way binary searches work. it would be quite surprising if only that column never works. if you have data in that row that should not be part of the lookup, do not include it in the formula lookup range.
    Last edited by JosephP; 05-14-2012 at 09:52 AM.

  8. #8
    Registered User
    Join Date
    09-01-2011
    Location
    Blacksburg, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Lookup #N/A Error

    Yeah, I'm not sure why that's the only one. Thanks for the help though! Thread marked as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1