+ Reply to Thread
Results 1 to 5 of 5

Vlookup possibly

  1. #1
    Registered User
    Join Date
    01-10-2008
    Posts
    36

    Red face Vlookup possibly

    Hi,
    Please see attached. On sheet 11 i have two columns, one part number and the other order number. On sheet 12 I would like to return the order number which still has stock, for the example would need to return line 23 column 4. If i do a standard vlookup it returns a blank, as the first vlookup is a blank cell.
    :o(
    Help!
    Attached Files Attached Files
    Last edited by lian.cragg; 03-21-2011 at 12:48 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Vlookup possibly

    Hi

    Try
    =INDEX(Sheet12!$C$4:$C$42,MATCH(Sheet11!A4,Sheet12!$B$4:$B$42,0)*(Sheet12!$A$4:$A$42>0))
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Registered User
    Join Date
    01-10-2008
    Posts
    36

    Re: Vlookup possibly

    Hi Roger, for some reason this worked fine in the example sheet but when i tried to apply the same formula to the live sheet is didn't work. If i used the exact formula you said it returned 0. If i changed the * to a , it only returns the first instance of the part number?
    This is the formula im using in the live sheet, =IF(C1427="","",INDEX('HP CAs'!K:K,MATCH('Asset Delivery Sheet'!C1427,'HP CAs'!J:J,0),('HP CAs'!I:I>0)))
    Iv tried using an array rather than columns, still just retuns the first value.
    Any clues? :o)
    Thank you.

  4. #4
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Vlookup possibly

    Hi Lian

    Can't see any obvious reason.
    You have to use the *. That is the equivalent of AND, which is what you want.
    Other than your ranges being wrong, I can't immediately see what the problem is.
    If you want to post your sheet up to the forum, so I can see the actual data, I might get a clue.

  5. #5
    Forum Contributor
    Join Date
    01-25-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2016
    Posts
    166

    Re: Vlookup possibly

    Lian,
    You can accomplish what you what with an array forumla. In cell B4 put the following:

    Please Login or Register  to view this content.
    Now Push CTRL-SHIFT-ENTER (not just ENTER)

    In B4 you will now see"

    Please Login or Register  to view this content.
    The {} tells you it is an array formula, but you cannot just type them in, you have to enter the fromula with CTRL-SHIFT-ENTER. You can copy the formula down if there is any need to do so, it will stay as an array formula when you copy it.

    FYI some folks refer to array formulas as CSE, for obvious reasons.

    Regards,

    Tom

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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