Closed Thread
Results 1 to 6 of 6

Help with Look Up Table Please?

  1. #1
    Jennifer
    Guest

    Help with Look Up Table Please?

    I don't know if this is possible but here is my table:

    Item Date Qty
    xyz 7/3 452
    xyz 7/4 225
    zzy 7/2 120
    abc 7/1 352

    Can I do a lookup that will first search for Item, then date and return qty?
    So if Item = xyz, and date = 7/4, then 452, else 0?

    Any help is appreciated! TIA

  2. #2
    Ragdyer
    Guest

    Re: Help with Look Up Table Please?

    Say your datalist is A2 to C5,
    And you enter your search criteria in
    D1 = item
    D2 = date

    Then try this:

    =SUMPRODUCT((A2:A5=D1)*(B2:B5=D2)*C2:C5)

    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Jennifer" <Jennifer@discussions.microsoft.com> wrote in message
    news:6FFAAD33-5A0D-4A8C-8D0D-C8B1E9B1DF12@microsoft.com...
    >I don't know if this is possible but here is my table:
    >
    > Item Date Qty
    > xyz 7/3 452
    > xyz 7/4 225
    > zzy 7/2 120
    > abc 7/1 352
    >
    > Can I do a lookup that will first search for Item, then date and return
    > qty?
    > So if Item = xyz, and date = 7/4, then 452, else 0?
    >
    > Any help is appreciated! TIA



  3. #3
    Toppers
    Guest

    RE: Help with Look Up Table Please?

    Enter as an array formula with Ctrl+Shift+Enter

    E1 contains Item
    E2 contains date

    =IF(ISNA(INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0))),0,INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0)))

    HTH

    "Jennifer" wrote:

    > I don't know if this is possible but here is my table:
    >
    > Item Date Qty
    > xyz 7/3 452
    > xyz 7/4 225
    > zzy 7/2 120
    > abc 7/1 352
    >
    > Can I do a lookup that will first search for Item, then date and return qty?
    > So if Item = xyz, and date = 7/4, then 452, else 0?
    >
    > Any help is appreciated! TIA


  4. #4
    Jennifer
    Guest

    RE: Help with Look Up Table Please?

    It worked. Thanks a bunch!

    "Toppers" wrote:

    > Enter as an array formula with Ctrl+Shift+Enter
    >
    > E1 contains Item
    > E2 contains date
    >
    > =IF(ISNA(INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0))),0,INDEX($C$2:$C$5,MATCH(1,($A$2:$A$5=E1)*($B$2:$B$5=E2),0)))
    >
    > HTH
    >
    > "Jennifer" wrote:
    >
    > > I don't know if this is possible but here is my table:
    > >
    > > Item Date Qty
    > > xyz 7/3 452
    > > xyz 7/4 225
    > > zzy 7/2 120
    > > abc 7/1 352
    > >
    > > Can I do a lookup that will first search for Item, then date and return qty?
    > > So if Item = xyz, and date = 7/4, then 452, else 0?
    > >
    > > Any help is appreciated! TIA


  5. #5
    Registered User
    Join Date
    01-05-2008
    Posts
    51

    Re: Help with Look Up Table Please?

    How can I pick the Quantity for the nearest possible date.

    For example, if the date is 7/2 and the item is xyz, then 452 should be displayed.

    Thanks in advance,

    Ravi.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Help with Look Up Table Please?

    @Ravi,

    Your post does not comply with Rule 2 of our Forum RULES.
    Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

Closed 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