+ Reply to Thread
Results 1 to 6 of 6

Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Harrisonburg, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    Hi everyone.

    I want to say =SUMIFS($E4:$AI4,E5:AI5,"DM"OR"DY")

    Can't get the OR part to work. Any ideas? It works the way I have it in the title but I'd like to learn how to shorten it.



    Thanks in advance for any help!

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

    Re: Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    Try

    =SUM(SUMIF(E5:AI5,{"DM","DY"},$E4:$AI4))

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    calebk2001,

    Give this a try:
    =SUM(SUMIFS($E4:$AI4,E5:AI5,{"DM","DY"}))

    [EDIT]:
    Looks like I got beat to it by Jonmo1, and his is backwards compatible
    Last edited by tigeravatar; 07-08-2013 at 01:35 PM. Reason: added edit
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    02-28-2013
    Location
    Harrisonburg, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    Thanks guys! That's just exactalactly what I needed

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

    Re: Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    You're welcome.

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

    Re: Shorten this? =SUM(SUMIFS($E4:$AI4,E5:AI5,"DM")+(SUMIFS($E4:$AI4,E5:AI5,"DY")))

    Another possibility...

    If those are the only 2 letter entries that start with the letter D:

    =SUMIF(E5:AI5,"D?",E4:AI4)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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