+ Reply to Thread
Results 1 to 4 of 4

Formula to bring back a number if X is Y or Z

  1. #1
    Forum Contributor
    Join Date
    09-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    132

    Formula to bring back a number if X is Y or Z

    Hello,

    Not exactly sure what to put as the title, but this is what I am after.

    What I want to do is:

    Lookup C5 (green) is in sheet5 (other tab) in column A, search for small/medium/large in column I (blue) and then bring back the quantity in column Q (yellow)

    Something like..

    LOOKUP( C5 in column A, IF small/medium/large, bring back number of small/medium/large tshirts left)

    See the example attached

    Example 4.xlsxThanks

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Formula to bring back a number if X is Y or Z

    Have a look at the attached. An array formula (confirmed with Ctrl+Shft+Enter) does all the work for you. At least I think this is what you mean.

    I would suggest "Multiple criteria lookup" as the title for your thread.
    Attached Files Attached Files
    If I've been of help, please hit the star

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to bring back a number if X is Y or Z

    Non-array formula

    =SUMPRODUCT(--(Sheet5!$A$2:$A$17=$C5),--(Sheet5!$I$2:$I$17=E$4),Sheet5!$Q$2:$Q$17)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    09-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Formula to bring back a number if X is Y or Z

    This is great, both work thanks!

+ 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