+ Reply to Thread
Results 1 to 7 of 7

extract multiple data based on criteria

  1. #1
    Registered User
    Join Date
    03-01-2010
    Location
    Buck Creek, Indiana
    MS-Off Ver
    Excel 2003
    Posts
    8

    extract multiple data based on criteria

    Hello all, I have searched and searched and searched and I just cant get what I am trying to do in excel. Please bare with me as I try to explain this the best I can. What I am looking to do is return multiple results based on one value. This is an agricultural based spreadsheet. So I have a column of seed products that I am going to plant for each respective field.

    excel example.png

    What I want to do at the bottom of this spreadsheet is list out each product horizontally across a row and have excel list each field that matches that seed number variety number. See Picture 2

    excel 2 example.png

    From what I can tell is some sort of array formula must be used here to be able to do what I want to do. Is there anyone out there than can tell illustrate how to do?

    I have attached my spreadsheet if anyone is willing to create the formula for a few to get me started?

    Thank you for looking.
    Attached Files Attached Files
    Last edited by FDibbins; 01-10-2017 at 04:56 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Looking for an excel master for an array formula (i think)

    Would a pivot table work for you? If there is a 1 on the column it means that the variety is in that field.

    With some VBA, I could take it a step further and list the field names. Most will have 1 or 2 - Variety 64-34 will have 58.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    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: extract multiple data based on criteria

    I changed your title to something more descriptive of your problem

    Try this ARRAY formula...
    =IFERROR(INDEX($B:$B,SMALL(IF($J$2:$J$74=K$79,ROW($A$2:$A$74)),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Then copy down and across as needed
    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

  4. #4
    Registered User
    Join Date
    03-01-2010
    Location
    Buck Creek, Indiana
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: extract multiple data based on criteria

    Wow, FDibbins thank you so much, I have been trying to do this all day and you did it in like a half hour. My only problem is that I am running into now is the way I want to organize it is making something mess up on me. I can copy and paste that formula to the right and it works however I only want to go about 6 entries before I want to start another 6 entries on rows below that. See my example. It will not copy correctly when I go back to the original column I start this formula in. Does it have something to do with the "rows" portion of the last part of the formula? I don't understand what that part is doing?

    excel 3 example.png


    I have a lot of hidden columns too. Could that be affecting it? Should I really try and move those hidden columns to another sheet?
    Attached Files Attached Files

  5. #5
    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: extract multiple data based on criteria

    You need to start the ROWS() function back at $A$1:A1

  6. #6
    Registered User
    Join Date
    03-01-2010
    Location
    Buck Creek, Indiana
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: extract multiple data based on criteria

    Excellent work! Thank you both so much.

  7. #7
    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: extract multiple data based on criteria

    Happy to help

    If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. Dynamic Sub Tables Based On Master Sheet Array formula & drilling through
    By pamela16 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-16-2019, 05:48 AM
  2. MS Word Master with Limited Excel Formula Skill
    By mmallard in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 03-24-2015, 03:48 PM
  3. Replies: 9
    Last Post: 09-13-2013, 10:16 PM
  4. Array formula? Populate tabs based on Master tab
    By MjRmatt in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-18-2013, 07:58 AM
  5. Needed urgent help from a excel master to provide and explain a formula
    By amitav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2012, 04:21 AM
  6. Replies: 0
    Last Post: 03-19-2012, 07:32 PM
  7. Replies: 2
    Last Post: 11-09-2010, 12:37 PM

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