+ Reply to Thread
Results 1 to 6 of 6

Vlookup = #N/A

  1. #1
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Vlookup = #N/A

    Hi,

    I am using the following IF formula;

    =IF(AND(I21>1,I21<2),VLOOKUP(A3+30,A21:G968,2,FALSE),"")

    For most of the cells this work smoothly. However;
    The lookupvalues in column A is dates. I do not have data for all the dates of the year, and therefore I get an error when the lookupdate + 30 days does not exist in my spreadsheet.

    What I am trying to do, is get the "A3+30" in my formula to become some sort of count. That is to say, I would like the values in A33 to show, regardless if this is the date in A3 + 30 days.

    Hope this explaination was good enough for someone to grasp my problem and are willing to guide me

    (If not I can provide a sample sheet)

    Gnoke
    Last edited by gnoke; 08-24-2010 at 09:41 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Vlookup = #N/A

    If you want to look up A33, why not lookup A33 instead of A3 + 30?
    If that's not what you mean, then I think a sample workbook would help a lot!
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup = #N/A

    Do you mean?

    =IF(AND(I21>1,I21<2),IF(ISNA(MATCH(A3+30,A21:A968,0)),A33,VLOOKUP(A3+30,A21:G968,2,FALSE)),"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Vlookup = #N/A

    Thanks for replays,

    I was clearly not good enough to explain, my bad.

    The cell D5 is a sample issue here. The rest #N/A is (as I you probably already understand) due to the limited date-sample here.
    I see that A1 + 30 here looks after date 04.02.2007, since there is no such date in my sheet I would really like to get the value of the next date that exists, in this case the value of 05.02.2007 = 1.

    Gnoke
    Attached Files Attached Files

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Vlookup = #N/A

    Assuming you are only missing weekends, as appears to be the case, how about:
    =IF(AND(C1>1,C1<2),VLOOKUP(A1+30+CHOOSE(WEEKDAY(A1+30,2),0,0,0,0,0,2,1),A1:C40,2,FALSE),"")

  6. #6
    Forum Contributor
    Join Date
    07-21-2010
    Location
    Alta, Norway
    MS-Off Ver
    Excel 2003
    Posts
    119

    Re: Vlookup = #N/A

    Life-savior, thanks a lot mate

    Gnoke

+ 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