+ Reply to Thread
Results 1 to 4 of 4

Matching multiple columns using Match function

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    London
    MS-Off Ver
    Professional Plus 2010
    Posts
    2

    Matching multiple columns using Match function

    I am trying to extract the total of certain lines and certain columns from a big P&L by department spreadsheet, I am currently using this formula:

    =(SUMPRODUCT(("Revenue"='[Mapping and PL-BS inputs.xlsx]ProfitandLoss'!$A$11:$A$300)*("Rental Income"='[Mapping and PL-BS inputs.xlsx]ProfitandLoss'!$B$11:$B$300)*(INDEX('[Mapping and PL-BS inputs.xlsx]ProfitandLoss'!D$11:AZ$300,,MATCH("DEPARTMENT NAME",'[Mapping and PL-BS inputs.xlsx]ProfitandLoss'!D$7:AZ$7,0))))/1000)

    Revenue being the top classification, rental income being the sub-classification, I want to be able to do this for multiple department names (column headings) within the same sumproduct, not just doing +(the whole formula again).

    I have tried using an array in place of department name, but I couldn't get that to work.

    Thanks for your help.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Matching multiple columns using Match function

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-07-2018
    Location
    London
    MS-Off Ver
    Professional Plus 2010
    Posts
    2

    Re: Matching multiple columns using Match function

    I believe I have attached the file correctly.

    Sheet 1 contains the formulae I am trying to improve, if you look at cell F6 for example, I am trying to sum all revenue lines for divisions 1 and 3 and have done this by duplicating the formula I initially posted.

    I am dealing with 30-50 entities/divisions, so this can make the formula very long and difficult to understand if I am summing a lot of entities/divisions, I would like to be able to replace the "Division 3" say with something like {"Division 1", "Division 4", "Division 6"}.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,555

    Re: Matching multiple columns using Match function

    This proposal employs a variable number of 'helper' columns depending on the number of divisions (I:K in the attached example) which may be moved and/or hidden for aesthetic purposes.
    Populate row 1 sheet 1 with the division names,
    Populate the columns under those headings using: =IF(ISNUMBER(SEARCH(RIGHT(I$1,1),$A6)),I$1,"")
    Populate F6:F7 using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Populate F12:F13 using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Problem Finding Data in Multiple Columns Using Match Function
    By joshc22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2012, 04:26 PM
  2. Function for looping through multiple columns to match selections from comboboxes?
    By hugo.hardy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2012, 04:53 AM
  3. Replies: 3
    Last Post: 09-30-2011, 02:50 AM
  4. Index & Match Function with multiple columns
    By bmc1975 in forum Excel General
    Replies: 2
    Last Post: 10-28-2010, 10:07 AM
  5. match function over multiple columns
    By deanomcbeano27 in forum Excel General
    Replies: 4
    Last Post: 03-03-2010, 09:17 AM

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