+ Reply to Thread
Results 1 to 4 of 4

Formulas and Dates

  1. #1
    Registered User
    Join Date
    06-16-2011
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    20

    Formulas and Dates

    Hi,

    I am trying to sum unique names in a column with a specific date. Thanks to some help from one of the gurus here I was able to successfully get a sum. I have the formula setup for a specific date but when I change the date I get the #VALUE! error. I know that I am not explaining this very well so I have included a file.

    The first formula works and looks like
    =SUMPRODUCT(1/COUNTIF(IF(B1:B40=DATE(2010,1,31),A1:A40,CHAR(1)),IF(B1:B40=DATE(2010,1,31),A1:A40,CHAR(1))))-1

    However the second does not and looks like
    =SUMPRODUCT(1/COUNTIF(IF(B1:B40=DATE(2009,2,22),A1:A40,CHAR(1)),IF(B1:B40=DATE(2009,2,22),A1:A40,CHAR(1))))-1

    The only thing that is different is the two dates. Please see attached file for further details.

    Thanks in Advance
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: Formulas and Dates

    Hi graybush
    find a workaroung in the attach file. it may be helpfull
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Formulas and Dates

    To count unique names for a given date given your version (XL2010)

    Please Login or Register  to view this content.
    However, you would be best served storing the date value in an adjacent cell (say D1) and referencing that cell in the formula in place of the explicit DATE call. This approach would permit you to simply copy the formula down rather than manually altering each formula for a different date.

    For backwards compatibility (ie pre COUNTIFS) you can use either:

    Please Login or Register  to view this content.
    In the above I have used D1 to store the Date value of interest - alluded to previously.

  4. #4
    Registered User
    Join Date
    06-16-2011
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Formulas and Dates

    Thanks for help...is it possible that you could walk me through exactly what the formula below is doing? It works and all I am just looking to understand better how it works...

    =SUMPRODUCT(($B$1:$B$40=$D1)*(MATCH($A$1:$A$40&"@"&$B$1:$B$40,$A$1:$A$40&"@"&$B$1:$B$40,0)=(ROW($A$1:$A$40)-ROW($A$1)+1)))

    Thanks

+ 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