Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
beechum1
 
Posts: n/a
Default Count the how many different values in a range


in a given range, a1:a50, if i have 5,4,3,2 or 1 different date,
(formatted as 1-Jan if relevent) I want to know how many different
dates there are.

1-Jan
2-Jan
3-Jan
5-Jan
for instance would return a value of 4

1-Jan
5-Jan
would return a value of 2.

I just don't know what statement to even start with.....


--
beechum1
------------------------------------------------------------------------
beechum1's Profile: http://www.excelforum.com/member.php...o&userid=30489
View this thread: http://www.excelforum.com/showthread...hreadid=511438

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Count the how many different values in a range

Hi!

If you want the count of ALL dates:

=COUNT(A1:A50)

If you want the count of unique dates:

1-Jan
1-Jan
1-Jan
5-Jan

Result would be 2:

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

Biff

"beechum1" wrote in
message ...

in a given range, a1:a50, if i have 5,4,3,2 or 1 different date,
(formatted as 1-Jan if relevent) I want to know how many different
dates there are.

1-Jan
2-Jan
3-Jan
5-Jan
for instance would return a value of 4

1-Jan
5-Jan
would return a value of 2.

I just don't know what statement to even start with.....


--
beechum1
------------------------------------------------------------------------
beechum1's Profile:
http://www.excelforum.com/member.php...o&userid=30489
View this thread: http://www.excelforum.com/showthread...hreadid=511438



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Count the how many different values in a range

Hmmm........

Or, maybe you only want to count the dates if they are the 1st, 2nd, 3rd,
4th or 5th of the month:

Month and year specific: (for Jan 2006 only)

=SUMPRODUCT(--(A1:A50=DATE(2006,1,1)),--(A1:A50<=DATE(2006,1,5)))

For any month/year (1900 and up)

=SUMPRODUCT(--(DAY(A1:A50)=1),--(DAY(A1:A50)<=5))

Biff

"Biff" wrote in message
...
Hi!

If you want the count of ALL dates:

=COUNT(A1:A50)

If you want the count of unique dates:

1-Jan
1-Jan
1-Jan
5-Jan

Result would be 2:

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

Biff

"beechum1" wrote
in message ...

in a given range, a1:a50, if i have 5,4,3,2 or 1 different date,
(formatted as 1-Jan if relevent) I want to know how many different
dates there are.

1-Jan
2-Jan
3-Jan
5-Jan
for instance would return a value of 4

1-Jan
5-Jan
would return a value of 2.

I just don't know what statement to even start with.....


--
beechum1
------------------------------------------------------------------------
beechum1's Profile:
http://www.excelforum.com/member.php...o&userid=30489
View this thread:
http://www.excelforum.com/showthread...hreadid=511438





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
beechum1
 
Posts: n/a
Default Count the how many different values in a range


nm, I found the group of threads on the countu formula, which i'm still
a little confused on... was that taken out of 2003? or was it every
available???

Seems like a handy formula to have.


--
beechum1
------------------------------------------------------------------------
beechum1's Profile: http://www.excelforum.com/member.php...o&userid=30489
View this thread: http://www.excelforum.com/showthread...hreadid=511438

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
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
count date occurances in range of dates... Alex Excel Worksheet Functions 2 July 27th 05 04:15 PM
Count Unique Values annie Excel Worksheet Functions 1 June 9th 05 07:19 AM
Count number of Unique values Alan Excel Worksheet Functions 4 January 6th 05 08:05 PM


All times are GMT +1. The time now is 11:15 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"