+ Reply to Thread
Results 1 to 5 of 5

INDEX matching multiple criteria with multiple results

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2007
    Posts
    6

    INDEX matching multiple criteria with multiple results

    Please help,

    In the first tab "Input" i have data as follows:

    A=Serial Number
    B=Date
    C=Client
    D=Supplier
    E=Mileage
    F=Cost
    G=Vehicle

    this rows of data are entered over a yearly period.

    In another tab, i wish to summarise this information and print the results including total figures.

    I expect the information of any month to print on to A4 paper so at the bottom og the page i would include =Sum formula to total the column.

    If for example i want to list all the data for a certain vehicle in a certain month what formula would i use?

    I can so far match the vehicle, but struggling with the month part.

    here is the array formula i am currently using:

    {=IF(ISERROR(INDEX(INPUT!$A$1:$G$500,SMALL(IF(INPUT!$A$1:$G$500=$B$3,ROW(INPUT!$A$1:$G$500)),ROW(1:1)),2))."",INDEX(INPUT!$A$1:$G$500,SMALL(IF(INPUT!$A$1:$G$500=$B$3,ROW(INPUT!$A$1:$G$500)),ROW(1:1)),2))}

    I copied that formula, i dont understand it though. Basically it returns all the information in various rows that matches the vehicle reg i have in B3. I now need it to only return the information from a certain month that i may enter in E3.

    I hope i have explained this properly. Any help is greatly appreciated.
    Last edited by Montanes; 06-22-2011 at 04:21 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: INDEX matching multiple criteria with multiple results

    Personally, I would add a "helper" column to my data set so that as I keep editing my criteria on the REPORT page a numeric "index" would appear in the data so the main report didn't need to do all the array stuff you're doing.

    If you post you your workbook so I don't have to create it manually I'll show you exactly.

    In general, in column H you'll create a "test" formula that looks to see if the ONE row matches the criteria on the report, and if so it adds a number. The formula adds a new number for each row that uniquely matches the criteria, whatever it may be.

    Then you do a simple INDEX/MATCH on the REPORT sheet to show all the uniquely numbered rows. No array.


    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    06-21-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: INDEX matching multiple criteria with multiple results

    In tab "Input" i enter the relevant data on going.

    In tab "Summary" i would like to print A4 the results matching Reg No and Month as indicated in B3 & E3 consecutively.

    The result would then be shown from row 7 down (example in red). i do not expect any more than 20 rows per month, so i intend to place simple sums at the foot of the page to total the returned information.

    Thanks in advance if anyone comes up with an answer, it's driving me insane!!
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,240

    Re: INDEX matching multiple criteria with multiple results

    Hello Montanes,

    See the attached. Used a dynamic range to adjust the data accordingly. Hope this helps.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    06-21-2011
    Location
    Glasgow
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: INDEX matching multiple criteria with multiple results

    I dont know how, but it works. Thanks a lot.

+ 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