+ Reply to Thread
Results 1 to 9 of 9

Searching matching vertical and horizontal criteria in multiple sheets

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    Bangkok
    MS-Off Ver
    Excel 2013
    Posts
    8

    Searching matching vertical and horizontal criteria in multiple sheets

    From the attached Workbook:

    I need to lookup 2 criteria from the ‘Tracking’ sheet (a name from column B, and a location from Row 2) and search within multiple ‘Month’ sheets (I have only shown 2 but in reality there are 12) to find the name and corresponding location vertically. I then need the ‘Tracking’ sheet cell to return a ‘1’ if the found match has a ‘Result’ column value of either “Early”, “Ontime”, or “Late”, and to be left blank for all other permutations.

    I have tried with VLOOKUP, HLOOKUP, INDEX, MATCH etc but cannot bet anywhere near.

    I guess my complication is search criteria listed both vertically and horizontally and finding a match in sheets in different range of cell ranges.

    I have manually populated the ‘Tracking’ sheet with the expected values that should be returned if a formula works.

    I would prefer a solution using standard Excel functions because others will need to understand this in the future, but VB Code will be acceptable is that is the way forward.

    Thanks a bunch for any help.
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    Can't you put all the months on one sheet only? That would make your life a lot easier.
    Otherwise, I think you'll need a macro.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    This formula works for 2 months. If you want you can add the 10 other months within the OR statement:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-01-2013
    Location
    Bangkok
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    Thanks for the reply p24lederc.

    It's a tricky one I know, but these sheets are established and so I cannot reformat them. I will work with the formula you have suggested and try to make that work - I'll play around with it.

    Thanks again for the assistance - appreciated!

  5. #5
    Registered User
    Join Date
    08-25-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    It would help if you can add another column to the month tracker, then you can do a sumifs function.. like this

  6. #6
    Registered User
    Join Date
    02-01-2013
    Location
    Bangkok
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    onroute,

    Thanks for the suggestion - it must have taken some time to do that, so it is appreciated!

    I see what you have done, but I think for the actual spreadsheets that I am working with, the shear number of names (in the hundreds) and locations (around 50) will make this impossible to implement. I like what you have done though, and I can actually use this in another scenario that I am working with, so it has not gone to waste I can assure you!

    It does look like code is the way to go, but I will have to do some serious research on it to elevate my basic skills in this area.

    Thanks again.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    Bloozntooz,

    I noticed your profile says Excel 2003, but you uploaded an .xlsx file; try this and see if it works for you. (I don't recall when COUNTIFS was introduced or if it will work in 2003 version.)

    With a helper column listing the sheet names in R2:R3 of Tracking sheet this array-entered formula in C3 filled down and across to G6
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Array enter means the formula must be committed by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    The file is attached.

    Does this do what you want and is it scalable for your future use? The keys are the helper range and INDIRECT.
    Attached Files Attached Files
    Last edited by FlameRetired; 04-13-2015 at 04:38 PM.

  8. #8
    Registered User
    Join Date
    02-01-2013
    Location
    Bangkok
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    FlameRetired,

    I think you should come out of retirement!! That is absolutely tremendous - it works! I simply have to modify the ranges to adapt it to the actuals, and there is it.

    BTW: I have updated my profile - I am using Office 2013.

    Thanks a million - very very cleverly done

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Searching matching vertical and horizontal criteria in multiple sheets

    You're welcome, glad it works. Thanks for the feedback and the rep.

+ 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] Summing Data with Multiple Criteria on Horizontal and Vertical Axis'
    By tlscowden in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2015, 03:11 PM
  2. [SOLVED] Matching multiple criteria in two books, one data is horizontal, the other is vertical.
    By udrmichelle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-18-2015, 04:58 PM
  3. [SOLVED] 3 criteria for horizontal and vertical matching
    By mator in forum Excel General
    Replies: 5
    Last Post: 12-24-2014, 07:19 AM
  4. 3 criteria for horizontal and vertical matching from a table
    By mator in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-24-2014, 06:28 AM
  5. Replies: 5
    Last Post: 06-06-2013, 05:12 PM

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