+ Reply to Thread
Results 1 to 5 of 5

Return multiple rows based on multiple criteria

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Asia
    MS-Off Ver
    Excel 2007
    Posts
    23

    Return multiple rows based on multiple criteria

    Hi everyone,

    I have some problem with an array formula.... I have tried online to find the answer for a couple of hours now but cant find anything...

    Basically I have a 72 rows of sales data for a product and I need to extract data based on multiple criteria.

    Right now I am using the following formula.

    =(INDEX($B$280:$I$352,SMALL(IF($H$280:$H$352&$I$280:$I$352=$M$87&$D$88,ROW($I$280:$I$352)),ROW($AAB1))-279,4))

    $D$88 refers to a cell that right now says 0%. So if $I$280:$I$352 = 0 then that cell i true (if H also matches that row of course).
    $M$87 refers to a cell that right now says Martin, so if $H$280:$H$352 says Martin then it gets a true.

    The above formula works fine, and when i drag it down it adds the next matching value etc. = Perfect!

    Problem:

    I would like to check which cells in $H$280:$H$352 that only contain the character M and then return true. Not exactly Martin


    I would like to check which cells in $I$280:$I$352 that are above 0%, or between 15-30%.

    The following formula I am using does not seem to be able to do this. Any suggestions?

    Regards!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Return multiple rows based on multiple criteria

    If you are up for a helper column/s, then you could use this...

    =vlookup("*M*",$H$280:$H$352,1,0)
    and
    =and(H280>0,H280<0.15) you need to decide if you want it to be < 15% or <30%...or just have 2 formulas/columns
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Return multiple rows based on multiple criteria

    Nils88,

    Attached is an example workbook based on the criteria you described.
    I have hidden rows 3:85 and rows 166:277
    In cell M87 is where you can enter a partial match for the values in $H$280:$H$352
    In cell D88 is where you can enter the lowest value to find in $I$280:$I$352
    In cell D89 is where you can enter the highest value to find in $I$280:$I$352
    Row 279 is a header row and data is in rows 280:352
    This array formula is in cell C92 and copied down. Note that array formulas must be entered with Ctrl+Shift+Enter and not just Enter:
    Please Login or Register  to view this content.

    When it runs out of matches, the formula returns a #NUM! error. You had no error checking in your original formula so I did not include any here. Does that work for you?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    Asia
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Return multiple rows based on multiple criteria

    Thanks a lot tigeravatar. Worked perfectly!
    I especially like the
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    part. I did not know that you could do a <=IF !!

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Return multiple rows based on multiple criteria

    You're very welcome

    If that takes care of your need, please mark this thread as solved.
    How to mark a thread Solved
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word "Title" you will see a dropdown with the words "No prefix"
    Change to "Solved"
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  2. [SOLVED] Return multiple rows based on 2 criteria
    By greyscale in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-30-2013, 09:26 PM
  3. Replies: 1
    Last Post: 05-18-2009, 11:21 AM
  4. Count Multiple Entries, Return Multiple Rows, Based On 3 Criteria
    By gtj_global in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-20-2008, 06:40 PM
  5. [SOLVED] return multiple rows of data based on criteria
    By steve_sr2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-28-2006, 12:15 AM

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