+ Reply to Thread
Results 1 to 5 of 5

adding another condition in sumproduct

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    25

    adding another condition in sumproduct

    Hi,

    My current SUMPRODUCT only sums the values in the current week, how would I go about making this only the sum the values if in G12:G222 the value doesn't equal TBA, i.e adding another condition to this?

    =SUMPRODUCT((Bogies!H12:H222+0>=TODAY()-WEEKDAY(TODAY())+1)*(Bogies!H12:H222+0<=TODAY()-WEEKDAY(TODAY())+7))

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: adding another condition in sumproduct

    Hi

    =SUMPRODUCT((Bogies!H12:H222+0>=TODAY()-WEEKDAY(TODAY())+1)*(Bogies!H12:H222+0<=TODAY()-WEEKDAY(TODAY())+7)*(Bogies!G12:G222<>"TBA"))

    But since you have XL 2010 can I suggest you should be using SUMIFS() formulae which are more efficient than the old SUMPRODUCT() array formulae.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: adding another condition in sumproduct

    Hi and welcome to the forum.

    Did tou try?

    =SUMPRODUCT((G12:G222<>"TBA")*(Bogies!H12:H222+0>=TODAY()-WEEKDAY(TODAY())+1)*(Bogies!H12:H222+0<=TODAY()-WEEKDAY(TODAY())+7))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    06-28-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: adding another condition in sumproduct

    Ok thanks that worked.
    If i was to change to the SUMIFS() what would my input be to do the same thing?
    Thanks my excel knowledge is a bit limited.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: adding another condition in sumproduct

    Hi,

    Looking at your original it appears that you are counting records rather than summing a range. If so I should have mentioned COUNTIFS() not SUMIFS().

    So..untested

    =COUNTIFS(Bogies!H12:H222,">="&TODAY()-WEEKDAY(TODAY())+1,Bogies!H12:H222,"<="&TODAY()-WEEKDAY(TODAY())+7,Bogies!G12:G222"<>"&"TBA")

+ 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