+ Reply to Thread
Results 1 to 5 of 5

Conditional SUMPRODUCT with blanks on different tab

  1. #1
    Registered User
    Join Date
    07-19-2013
    Location
    Oxford
    MS-Off Ver
    Excel 2010
    Posts
    11

    Conditional SUMPRODUCT with blanks on different tab

    Hi all,

    I have a column with some dates in it. I'm trying to count/sum how many dates are in October 2017, November 2017 etc. I've managed to find a formula that works but it returns a value error if it's on a different tab AND contains blanks. If there are blanks on the same tab it still seems to work, very strange to me! I've tried the following on a simple spreadsheet to try and get it to work:

    =SUMPRODUCT((MONTH(Sheet1!E2:E7)=10)*(YEAR(Sheet1!E2:E7)=2017),(Sheet1!E2:E7))
    =SUMPRODUCT((MONTH(Sheet1!E2:E7)=10)*(YEAR(Sheet1!E2:E7)=2017),--(Sheet1!E2:E7<>""))

    But I just get a value error.

    I'm trying to count/sum on a different tab so my final formula will be something like (if possible):
    =SUMPRODUCT((MONTH('[Trial Database Final.xlsm]S4 Database Linked'!X3:X5000)=10)*(YEAR('[Trial Database Final.xlsm]S4 Database Linked'!X3:X5000)=2017))

    Would very much appreciate help with this. What am I doing wrong?
    Many thanks.

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Conditional SUMPRODUCT with blanks on different tab

    Can you not use COUNTIFS instead if you want to count the number of instances?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Conditional SUMPRODUCT with blanks on different tab

    You say different tab but, by the cell refs you want to refer to a different worksheet. You can’t do that with COUNTIFS

    Your blanks are possibly formula blanks which don’t like MONTH and YEAR functions so try TEXT function, e.g.

    =SUMPRODUCT((TEXT(X3:X5000,"mmm-yy")="Oct-17")+0)
    Audere est facere

  4. #4
    Registered User
    Join Date
    07-19-2013
    Location
    Oxford
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Conditional SUMPRODUCT with blanks on different tab

    Thank you both so much! Worked a treat.

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Conditional SUMPRODUCT with blanks on different tab

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

+ 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. [SOLVED] Sumproduct to ignore blanks
    By Dgp2012 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-16-2020, 02:07 PM
  2. [SOLVED] want to sumdivided instead of sumproduct that contains blanks.
    By Jowel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-16-2013, 04:44 AM
  3. Using SUMPRODUCT across columns when I have blanks
    By edwardaggie98 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2013, 02:19 PM
  4. [SOLVED] Sumproduct counting blanks
    By yenaled in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2013, 03:03 AM
  5. SUMPRODUCT Help with Blanks
    By MIVELD in forum Excel General
    Replies: 5
    Last Post: 09-29-2008, 12:55 PM
  6. Sumproduct - Avoiding blanks
    By jpruffle in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-18-2008, 04:03 AM
  7. Sumproduct with blanks
    By Blondegirl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-30-2007, 05:21 AM
  8. Sumproduct - Blanks
    By wal50 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-28-2006, 11:55 AM

Tags for this Thread

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