+ Reply to Thread
Results 1 to 6 of 6

Matrix formula for vertical and horizontal sumif's ?

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Smile Matrix formula for vertical and horizontal sumif's ?

    Hi there,

    I am looking for a formula that could return the result for a look up request with data like this:

    123 456 123
    70 1 1 1
    30 1 1 1
    70 1 1 1

    I would like to have the sum (or count) of all cells (containing 1 here) where 1) the kolums start with 123 and the rows with 70, so there would be 2 arguments and the result here would be 4. The column headers / row labels would NOT be unique and the real tabel would be much bigger (more kolumns, more rows).

    Who knows a matrix formula that could do the trick? Thanks in advance ,

    Sabine
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Matrix formula for vertical and horizontal sumif's ?

    =SUMPRODUCT((B3:B5=70)*C3:E5*(C2:E2=123)) e example when number of columns=nr of rows

    The number of columns and rows should be the same. If not, just add references so they do, even if you add references to empty columns/rows ( see attachment)
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 11-24-2015 at 09:57 AM.

  3. #3
    Registered User
    Join Date
    10-09-2015
    Location
    Tampa, FL
    MS-Off Ver
    2013
    Posts
    3

    Re: Matrix formula for vertical and horizontal sumif's ?

    Pepe Le Mokko's solution is excellent; however, I do not believe there is a need for a constraint that the number of columns referenced must equal the number of rows referenced.

    -Toby

  4. #4
    Registered User
    Join Date
    10-24-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Matrix formula for vertical and horizontal sumif's ?

    Pepe, thank you very much for your excellent solution, it works like a charm (I have replaced the values in the formula with the cel references). And even better: not a matrix formula needed! I knew the SUMPRODUCT formula but did't realize that it would work here!

    Thanks again,

    Sabine

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Matrix formula for vertical and horizontal sumif's ?

    Graag gedaan

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Matrix formula for vertical and horizontal sumif's ?

    Never had so much rep for an answer. Thanks to all of 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] Sumif 2 criterias one horizontal with duplicates and 1 vertical
    By Mengo85 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-26-2015, 01:23 PM
  2. [SOLVED] Sumif Formula With 2 Condition in Horizontal & Vertical
    By Pawan Thakur in forum Excel General
    Replies: 4
    Last Post: 04-27-2015, 09:11 AM
  3. [SOLVED] array formula for vertical and horizontal data
    By freud1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2013, 09:23 PM
  4. Replies: 1
    Last Post: 04-12-2011, 07:18 PM
  5. vlookup on a matrix (vertical and horizontal)
    By pa56 in forum Excel General
    Replies: 8
    Last Post: 10-15-2009, 10:38 AM
  6. What formula, horizontal and vertical
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-28-2008, 08:06 PM
  7. Horizontal Vs. Vertical + Nested formula problems
    By alnoor in forum Excel General
    Replies: 9
    Last Post: 01-27-2008, 01:06 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