+ Reply to Thread
Results 1 to 10 of 10

sumif with horizontal

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    los angeles,ca
    MS-Off Ver
    Excel 2007
    Posts
    18

    sumif with horizontal

    hi All,

    I have

    a b c d e f g
    number amnt1 amnt2 amnt3 amnt4 amnt5 amnt6
    1 $10.00 $10.00 $10.00 $10.00 $10.00 $10.00
    2 $10.00 $10.00 $10.00 $10.00 $10.00 $10.00
    3 $10.00 $10.00 $10.00 $10.00 $10.00 $10.00
    4 $10.00 $10.00 $10.00 $10.00 $10.00 $10.00
    5 $5.00 $5.00 $5.00 $5.00 $5.00 $5.00
    6 $6.00 $6.00 $6.00 $6.00 $6.00 $6.00
    7 $7.00 $7.00 $7.00 $7.00 $7.00 $7.00

    please see the attached file for detailed info.

    i would need a formula to sum all values under "amnt3" in Column D.

    something like =sumif(a1:g8,"e",a1:g8)

    thank you in advanced!!
    Book1.xlsx

  2. #2
    Registered User
    Join Date
    11-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: sumif with horizontal

    One option which seems to work

    =SUM(OFFSET($A$1,1,MATCH(B12,B1:G1,0),7))

    with the values from B1:G1 in a data validation list in B12

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: sumif with horizontal

    Try this...

    B12 = PhysicalDamagePremium

    =SUM(INDEX(B2:G8,0,MATCH(B12,B1:G1,0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    los angeles,ca
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: sumif with horizontal

    thank you all they both work!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: sumif with horizontal

    You're welcome. We appreciate the feedback!

  6. #6
    Registered User
    Join Date
    06-11-2012
    Location
    los angeles,ca
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: sumif with horizontal

    Hi again,

    i'm in need of help again

    this time i added a new column consists of Year.

    please see the attached fileBook1.xlsx

  7. #7
    Registered User
    Join Date
    11-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: sumif with horizontal

    Put 2014 in B12 and 2015 in B13

    Put PhysicalDamagePremium in C12 and C13

    D12 copied down to D13

    =SUMIF($B$2:$B$8,B12,INDEX($C$2:$H$8,,MATCH(C12,$C$1:$H$1,0)))

  8. #8
    Registered User
    Join Date
    06-11-2012
    Location
    los angeles,ca
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: sumif with horizontal

    hi LittleFry,

    thank you for the prompt response!

    but would it be possible to add PhysicalDamagePremium and CompositeLiabilityPremium?
    so basically put another match and get result of

    $64.00=2014 PhysicalDamagePremium and CompositeLiabilityPremium

    thank you

  9. #9
    Registered User
    Join Date
    11-15-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: sumif with horizontal

    My suggestion would be to have both in different cells and then sum

    D12 copied down =SUMIF($B$2:$B$8,B12,INDEX($C$2:$H$8,,MATCH(C12,$C$1:$H$1,0)))

    Then sum in D14

    Please Login or Register  to view this content.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: sumif with horizontal

    You are getting to the point where you should start thinking about a small table for this - you keep adding criteria to your request
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Horizontal sumif problem
    By TheHeat82 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-08-2015, 12:04 PM
  2. [SOLVED] horizontal sumif
    By rnajohnson in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-05-2015, 02:37 PM
  3. [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
  4. Horizontal Sumif
    By lorber123 in forum Excel General
    Replies: 3
    Last Post: 10-15-2014, 10:06 PM
  5. SUMIF with Horizontal sum range
    By mennojim in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-18-2013, 04:26 PM
  6. [SOLVED] Copying and pasting Horizontal Data to Horizontal cells
    By jjin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2013, 01:14 AM
  7. [SOLVED] SUMIF Year-To-Date and Horizontal Summing
    By ANS in forum Excel General
    Replies: 10
    Last Post: 10-02-2012, 03:45 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