Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robin
 
Posts: n/a
Default Counting individual dates

I have a column of dates, some dates are repeated, and I would like a count
of the number of separate dates.

My sample column:
1/1/05
1/1/05
1/2/05

I want my return to be 2, because I have 2 different dates.

Is there a way to do this?

Thanx!

  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT((A1:A100<"")/COUNTIF(A1:A100,A1:A100&""))

Hope this helps!

In article ,
"Robin" wrote:

I have a column of dates, some dates are repeated, and I would like a count
of the number of separate dates.

My sample column:
1/1/05
1/1/05
1/2/05

I want my return to be 2, because I have 2 different dates.

Is there a way to do this?

Thanx!

  #3   Report Post  
Robin
 
Posts: n/a
Default

THANX Domenic... that did the trick! Now, where can I go to understand that
formula?

"Domenic" wrote:

Try...

=SUMPRODUCT((A1:A100<"")/COUNTIF(A1:A100,A1:A100&""))

Hope this helps!

In article ,
"Robin" wrote:

I have a column of dates, some dates are repeated, and I would like a count
of the number of separate dates.

My sample column:
1/1/05
1/1/05
1/2/05

I want my return to be 2, because I have 2 different dates.

Is there a way to do this?

Thanx!


  #4   Report Post  
Domenic
 
Posts: n/a
Default

Assuming...

A1: 1/1/05
A2: 1/1/05
A3:
A4: 1/2/05

Formula...

=SUMPRODUCT((A1:A4<"")/COUNTIF(A1:A4,A1:A4&""))

Here's how it breaks down...

(A1:A4<"") returns the following array of values:

TRUE
TRUE
FALSE
TRUE

COUNTIF(A1:A4,A1:A4&"") returns the following array of numbers:

2
2
1
1

(A1:A4<"")/COUNTIF(A1:A4,A1:A4&"") returns the following array of
numbers:

0.5
0.5
0
1

Note that the numerical equivalent of TRUE and FALSE is 1 and 0,
respectively. So the first array of values are divided by the second
array of values...

TRUE/2 ----- 0.5
TRUE/2 ----- 0.5
FALSE/1 ---- 0
TRUE/1 ----- 1

Then, lastly, SUMPRODUCT sums these values and returns 2.

Hope this helps!

In article ,
"Robin" wrote:

THANX Domenic... that did the trick! Now, where can I go to understand that
formula?

"Domenic" wrote:

Try...

=SUMPRODUCT((A1:A100<"")/COUNTIF(A1:A100,A1:A100&""))

Hope this helps!

In article ,
"Robin" wrote:

I have a column of dates, some dates are repeated, and I would like a
count
of the number of separate dates.

My sample column:
1/1/05
1/1/05
1/2/05

I want my return to be 2, because I have 2 different dates.

Is there a way to do this?

Thanx!


  #5   Report Post  
terabar
 
Posts: n/a
Default


Excellent breakdown explanation....

Never did understood the SUMPRODUCT() either... now, I guess I can use
this too!!


--
terabar
------------------------------------------------------------------------
terabar's Profile: http://www.excelforum.com/member.php...o&userid=24272
View this thread: http://www.excelforum.com/showthread...hreadid=379192



  #6   Report Post  
RagDyer
 
Posts: n/a
Default

This will give you a detailed explanation of the function and it's uses:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"terabar" wrote in
message ...

Excellent breakdown explanation....

Never did understood the SUMPRODUCT() either... now, I guess I can use
this too!!


--
terabar
------------------------------------------------------------------------
terabar's Profile:

http://www.excelforum.com/member.php...o&userid=24272
View this thread: http://www.excelforum.com/showthread...hreadid=379192


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting dates in a column Robb27 Excel Worksheet Functions 4 May 25th 05 09:31 AM
Counting Dates MJMP Excel Worksheet Functions 2 May 24th 05 07:34 PM
Counting occurences of a specific day between two dates coal_miner Excel Worksheet Functions 1 April 20th 05 03:37 PM
How to Calculate Dates without counting the weekends Lillian F Excel Worksheet Functions 9 January 24th 05 09:09 AM
counting entries between two dates? Todd Excel Worksheet Functions 7 November 1st 04 11:07 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"