+ Reply to Thread
Results 1 to 8 of 8

sumproduct exclude header

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Iowa City, IA
    MS-Off Ver
    Excel 2013
    Posts
    29

    Question sumproduct exclude header

    Hello All,

    I've searched for a solution but I can't make the answers to similar threads work for me.

    I want to use sumproduct on date columns (and sometimes date and numerical columns and/or text) and I want the formula to treat the data in those columns as a dynamic range (with constantly changing outer ranges), but I have headers and they have to stay. The data is not in a table format and there are no named ranges. The reason for this is we merge several workbooks periodically and the named ranges, etc. mess up the merging.

    The formula I use is this:

    =SUMPRODUCT((MONTH(ProductMaster!$A$2:$A$250)=2)*(YEAR(ProductMaster!$A$2:$A$250)=2017)*((ProductMaster!$A$2:$A$250)>3))

    and I want the ProductMaster!$A$2:$A$250 to be treated as a dynamic range to exclude headers.

    Is this even possible?

    Thanks

    Zeda

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,823

    Re: sumproduct exclude header

    Where are the headers?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-15-2011
    Location
    Iowa City, IA
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: sumproduct exclude header

    Sorry,

    Column Labels

    Date Sites
    1/1/2017 3

    Zeda

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

    Re: sumproduct exclude header

    The big issue is when that formula comes across a text string (A header), then it returns #Value! error, right?
    I suggest using a different formula (like countifs) that won't error in that case...

    Try
    =COUNTIFS(ProductMaster!$A$2:$A$250,">="&DATE(2017,2,1),ProductMaster!$A$2:$A$250,"<"&DATE(2017,3,1))

    This will not error when a text value is in column A.

    That 3rd criteria (A2:A250 > 3) seems redundant, so I removed it.

  5. #5
    Registered User
    Join Date
    03-15-2011
    Location
    Iowa City, IA
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: sumproduct exclude header

    Sorry my bad again= really having one of those mornings.

    =COUNTIFS(ProductMaster!$H:$H,">="&DATE(2017,2,1),ProductMaster!$H:$H,"<"&DATE(2017,3,1)) works. But the *((ProductMaster!$A$2:$A$250)>3)) should have been *((ProductMaster!$AD$2:$AD$250)>3)).

    Zeda

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

    Re: sumproduct exclude header

    Ok, 3rd criteria added

    =COUNTIFS(ProductMaster!$A$2:$A$250,">="&DATE(2017,2,1),ProductMaster!$A$2:$A$250,"<"&DATE(2017,3,1),ProductMaster!$AD$2:$AD$250,">3")

  7. #7
    Registered User
    Join Date
    03-15-2011
    Location
    Iowa City, IA
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: sumproduct exclude header

    Jonmo1,

    Thank you - that works slick.

    I really appreciate you're help.

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

    Re: sumproduct exclude header

    You're welcome.

+ 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] Filtered data to exclude header row
    By Sgligori in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-11-2016, 04:07 PM
  2. How to Exclude header from the from the macro
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-22-2015, 01:24 PM
  3. Exclude header row from dump
    By rlowe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2013, 10:52 PM
  4. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  5. Finging first row of a given column that has data in it.......exclude header
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2011, 02:23 PM
  6. [SOLVED] Exclude Header from Range?
    By nastech in forum Excel General
    Replies: 4
    Last Post: 12-30-2005, 10:55 AM
  7. How to exclude header row from sort button sorts?
    By JCabo in forum Excel General
    Replies: 1
    Last Post: 03-25-2005, 08:06 PM

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