+ Reply to Thread
Results 1 to 31 of 31

#REF! error.... for no apparent reason

  1. #1
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    #REF! error.... for no apparent reason

    All,

    I am new to this forum but have been using excel for basically forever.

    I ran into an error when am using a vlookup inside a vlookup in order to bring information from one place cross-referance it somewhere else and bring me the correct value for the cell.

    ok for the details i hope someone can help me.

    my code is as follows

    =VLOOKUP(VLOOKUP(BK2,main!A3:$CN$5000,main!$Q$2,0),ctrange!$A$1:$C$17,3,0)

    Firstly is the code written correctly?

    The information is all in the correct columns and tagged correctly, can anyone tell me where my problem is and what i can do to fix it ???

    Thanks in advance and have a great day !!!!!!!!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Sorry i wanted to do that... i couldnt figure out how to upload a sample sheet
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    There doesn't appear to be any values in the lookup range on worksheet 'main'.

  5. #5
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    ooops.... forgot to add those....

  6. #6
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    here you gotest book1.xlsx

  7. #7
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    here you go

  8. #8
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: #REF! error.... for no apparent reason

    Excel never gives #REF! errors without a reason.
    Quite often it is caused by deleting cells.

    Correct a #REF! error
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF! error.... for no apparent reason

    Main!Q2 appears to be empty - did you intend to have a value in that cell?
    Audere est facere

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    Still nothing in the lookup range on worksheet 'main'.

    That's causing the 'inner' VLOOKUP to return #N/A.

  11. #11
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: #REF! error.... for no apparent reason

    Hi,
    singer.joseph

    You hv used cell ref Q2 instead of col index.
    second thing nesting in vlookup function executes only when the result matches cell ref;

    lts_ram

  12. #12
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Its_ram,

    I changed the Q2 to q:q to reference the whole column and am still getting the error

  13. #13
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Sorry,

    In my original sheet there is a numerical value....

    Due to sensitivity of information i cant actually post the data

  14. #14
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Norie,

    In my spreadsheet i have a numeric value, as i posted to Its_ram, due to the nature of the info i cant post it in forums

  15. #15
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Thanks for your reply,

    i can assure you i havent deleted any cells

    and other ideas

  16. #16
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    Can't you put some dummy data in?

  17. #17
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF! error.... for no apparent reason

    What's in Main!Q2 in the real sheet?

  18. #18
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Random values in fraction format ie 3/4, 7/8, 1/2, 1 1/3, etc

  19. #19
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Ok i played around with it and now i have managed to get to #n/a.... any ideas of what to do now ?

  20. #20
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    How are the fractions being entered?

  21. #21
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    From a table using another vlookup

  22. #22
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Oh and yesterday we were upgraded to office 2010... if that makes a difference.

  23. #23
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    I don't know if it'll make a difference to the formula, but it might help find the problem.

    In Excel 2010 on the Formulas tab there is an Evaluate Formula button.

    If you select the cell with the formula and press that button you can step through the formula to see what's happening.

  24. #24
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    helpful for future use. thanks !!

    But didnt help me find the problem now... according to the values it gave me it should work, not give me an n/a value.....

  25. #25
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: #REF! error.... for no apparent reason

    Is there no way you can attach a workbook with dummy data?

    What exactly do you see when you evaluate the formula?

    Does it evaluate to #REF or #NA?
    Last edited by Norie; 02-18-2013 at 05:49 AM.

  26. #26
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF! error.... for no apparent reason

    Quote Originally Posted by singer.joseph View Post
    Random values in fraction format ie 3/4, 7/8, 1/2, 1 1/3, etc
    One of the VLOOKUPS is

    VLOOKUP(BK2,main!A3:$CN$5000,main!$Q$2,0)

    as main!A3:$CN$5000 is a 92 column wide range you's expect main!$Q$2 to be an integer between 1 and 92 - if it's not you may get #REF! errors

  27. #27
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Now its giving me a #N/A

  28. #28
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    $Q$2 is an integer between 1 and 92....

  29. #29
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: #REF! error.... for no apparent reason

    Quote Originally Posted by singer.joseph View Post
    $Q$2 is an integer between 1 and 92....
    Sorry is that a question or a statement? I previously asked what was in Main$Q$2 and you said that it was a fraction, or were you replying to something else?

  30. #30
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    Sorry for the confusion.....the value in Main$Q$2 is a whole number the values in the rest of the column are fractions

  31. #31
    Forum Contributor
    Join Date
    02-17-2013
    Location
    israel
    MS-Off Ver
    Excel 2003
    Posts
    106

    Re: #REF! error.... for no apparent reason

    So anyone... any ideas on how to fix it ?

    I figured out a temp solution using 6-7 if's but its not ideal....

+ 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