+ Reply to Thread
Results 1 to 5 of 5

Matching multiple criteria in two books, one data is horizontal, the other is vertical.

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    denver, co
    MS-Off Ver
    2013
    Posts
    12

    Matching multiple criteria in two books, one data is horizontal, the other is vertical.

    I have two huge workbooks that I need to compare data and put the answer into one of them. I have created an example workbook with two worksheets. The worksheets represent the two workbooks I'm using.

    On the first sheet, named 'workbook one', there is data in vertical format that I need to get onto the second sheet, named 'workbook two', in horizontal format. My actual data is huge - about 20,000 rows and half way through the alphabet on the double-lettered columns. My example workbook is much smaller, but set up the same way. I would like to be able to have a formula that I can drag without changing a ton of info in each cell.

    So, from 'workbook one', I want to get the Total Count for a specific Date and BU, to go into the appropriate cell on 'workbook two' with the same BU and Date. For example, the data in 'workbook one' cell D2, would show up in cell C2 in 'workbook two' (and D15 in 'workbook one' would display in D4 'workbook two', etc. )

    I don't know where to start. I guess I could do a search on the 'workbook one' A2:D25 to match the BU, once that is matched, match the Date, then see the data in the Total Count column and put that into the appropriate cell on 'workbook two'. Is this possible? My real workbook has 175 (rows)communities that need data in about 150 columns for each community. I really don't want to spend the next five days typing formulas.... please help
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Matching multiple criteria in two books, one data is horizontal, the other is vertical

    I would suggest that you use a helper column on Workbook one, with this formula in E2:

    =A2&"_"&TEXT(C2,"mmm yyyy")

    Copy this down to the bottom of your data by double-clicking the fill handle (the small black square in the bottom right corner of the cursor, with E2 selected).

    Then you can use this formula in C2 of workbook two:

    =INDEX('workbook one'!$D:$D,MATCH($A2&"_"&SUBSTITUTE(C$1,"Reviews ",""),'workbook one'!$E:$E,0))

    and copy this across and down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-11-2015
    Location
    denver, co
    MS-Off Ver
    2013
    Posts
    12

    Re: Matching multiple criteria in two books, one data is horizontal, the other is vertical

    Thank you for your help. This seems like it should work, but I'm getting #n/a in workbook two cell C2 with that formula. any thoughts?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Matching multiple criteria in two books, one data is horizontal, the other is vertical

    Works okay for me - file attached.

    Pete

    EDIT: maybe you missed the space after "Reviews "
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-11-2015
    Location
    denver, co
    MS-Off Ver
    2013
    Posts
    12

    Re: Matching multiple criteria in two books, one data is horizontal, the other is vertical

    It works! I had the space behind Reviews, but what I messed up on was this one =A2&"_"&TEXT(C2,"mmm yyyy") I only had two mm.

    Thank 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. [SOLVED] SUMIFS(?) I need to sum data using both horizontal and vertical criteria
    By bighandsam in forum Excel General
    Replies: 22
    Last Post: 01-06-2017, 11:31 PM
  2. [SOLVED] 3 criteria for horizontal and vertical matching
    By mator in forum Excel General
    Replies: 5
    Last Post: 12-24-2014, 07:19 AM
  3. 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
  4. Replies: 5
    Last Post: 06-06-2013, 05:12 PM
  5. Convert multiple rows into one, vertical to horizontal data
    By ortho-research in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-30-2009, 01:07 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