+ Reply to Thread
Results 1 to 7 of 7

Sum With Crietria

  1. #1
    Forum Contributor
    Join Date
    08-19-2006
    MS-Off Ver
    Excel 365
    Posts
    229

    Sum With Crietria

    Hi,

    I have the following Data Table and Summary table.


    I can use Pivot Table but I need a formula to perform the following:

    Example for Dallas
    1) Look at Data Table, search for column title "Branch".
    2) Then, under column title "Branch", look for "Dallas"
    3) Then look for column title "P1" and summarize how many for "Dallas" under "P1".

    The added challenge here is that the location of the column title in the Data Table table can often change. Sometimes P1 can be in column C, and sometime it could be in another column.

    Is there a way to accomplish this ? Appreciate all help.

    I have a cross post here:

    http://www.mrexcel.com/forum/excel-q...ml#post4117529
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Sum With Crietria

    If I understood your question correctly, you may want to reorganize your data if possible. Something like the attached may work.
    Attached Files Attached Files
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Sum With Crietria

    Use this formula n E18

    Pull it across and down

    =SUMPRODUCT(($G$5:$G$12=$D18)*($C$4:$I$4=E$17),$C$5:$I$12)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Contributor
    Join Date
    08-19-2006
    MS-Off Ver
    Excel 365
    Posts
    229

    Re: Sum With Crietria

    Dear mcmahobt,

    Thank you for your suggestions However, to rearrange the data would take a lot of time as the actual data table is very large and the report needs to be prepared on daily basis.

    Dear AlKey,

    If the branch column is changed to another column, the formula does not work. For example if on a particular day, the branch data column is not in column G but in column F, then the formula does not work.

    Appreciate your help and patience.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Sum With Crietria

    E18=SUMIFS(INDEX($C$5:$J$12,,MATCH(E$17,$C$4:$J$4,0)),INDEX($C$5:$J$12,,MATCH($D$17,$C$4:$J$4,0)),$D18)
    Try this and copy across
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Sum With Crietria

    @Kumara_faith

    The formula was written for the data you provided. There is now way for anyone to know what you going to change it to.

  7. #7
    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,053

    Re: Sum With Crietria

    nflsales' solution is (as ever) very nice. Here's another possibility - rather more long-winded, though...
    Attached Files Attached Files
    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

+ 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. Macro - AutoFilter and crietria
    By JosephC. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2014, 10:13 AM
  2. Copy data on crietria
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2012, 03:37 AM
  3. COUNTIF multiple crietria
    By Karol Satka in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-11-2006, 08:40 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