+ Reply to Thread
Results 1 to 14 of 14

How to use sumif on two columns (not sumifs)

  1. #1
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Question How to use sumif on two columns (not sumifs)

    I have two columns I want to search for my criteria. For example...

    L5 will contain the total for Joe. You can see Joe can be found under the "admit" column OR (not AND) the "discharge" column. He will never be in both at the same time in a particualar row. Any where Joe is, I want to copy the sum all the values from the "split" column.

    So L5 should contain 3.72

    I thought of sumifs but sumifs uses the AND. I want to look for Joe in either column.... Admit column OR Discharge column.

    Any thoughts? I tried sumif and OR but couldn't figure it out.

    Thank you



    Capture.PNG

  2. #2
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: How to use sumif on two columns (not sumifs)

    EDIT: Wrong Thread, sorry!

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to use sumif on two columns (not sumifs)

    It seems to me with this type of data, you would want to have separate summations for Admit and Discharge.
    So you have one cell that does the sumif on column A, and another does the sumif on column B, then add the 2 together..

    So in say L5 put
    =SUMIF(A:A,K5,H:H)
    and in M5 put
    =SUMIF(B:B,K5,H:H)
    then in N5 put
    =L5+M5

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to use sumif on two columns (not sumifs)

    In L5, try

    =SUMPRODUCT((C$6:D$7=K5)*(H$6:H$7))

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How to use sumif on two columns (not sumifs)

    Something like..
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  6. #6
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: How to use sumif on two columns (not sumifs)

    sorry guys i am having bad luck... i will upload my excel sheet, can someone please attempt their solution in my sheet, that way I dont mess anything up.

    Thank you
    Attached Files Attached Files

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to use sumif on two columns (not sumifs)

    Try Like this
    Attached Files Attached Files

  8. #8
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How to use sumif on two columns (not sumifs)

    Per you sample, try this in L5 as 63falcondude suggested. I changed the columns in the 1st part to reflect your sample.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to use sumif on two columns (not sumifs)

    Whoops, I didn't notice those hidden columns.

    Adjusting the formula as gmr4evr1 showed in post #8 should work for you.

  10. #10
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: How to use sumif on two columns (not sumifs)

    Try with
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  11. #11
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: How to use sumif on two columns (not sumifs)

    wow, you are all right lol. I tried all your suggestions and they worked. Like they say, more than 1 way to skin a cat. Thank you all. I just gotta figure out which way I want to go.

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to use sumif on two columns (not sumifs)

    You're welcome

  13. #13
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: How to use sumif on two columns (not sumifs)

    You're welcome.

  14. #14
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to use sumif on two columns (not sumifs)

    Glad we could help. Thanks for the rep!

+ 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. SUMIF or SUMIFS? or something else? - need formula help
    By rclough21 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-13-2016, 08:40 AM
  2. sumif()- or sumifs()?
    By szeconku in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2015, 04:11 AM
  3. Multiple SUMIF / SUMIFS
    By robbie010 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 06-18-2014, 08:11 AM
  4. [SOLVED] Sumif/Sumifs
    By kimsem in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-10-2014, 09:37 PM
  5. [SOLVED] SUMIF or SUMIFS adding time where criteria is in multiple columns
    By 66ev in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-14-2013, 02:21 PM
  6. [SOLVED] SUMIF v SUMIFS in 2010
    By London257 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2012, 05:35 AM
  7. Sumifs Or Sumif?
    By Carp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2007, 03:27 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