Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Function - Counting Years in range


Hi,

I've got a list of around 300 dates Format e.g 01/07/2006 for different
years. Also some entries have ' in front of them to make them text

I want to count the number of dates in say A2 to A300 (may have blanks)
and then count the how many in current year 2006.

Would like it to return something like "There are 200 entries in
current year out of 299".

Thanks in advance

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562126

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 94
Default Function - Counting Years in range


VBA Noob wrote:
Hi,

I've got a list of around 300 dates Format e.g 01/07/2006 for different
years. Also some entries have ' in front of them to make them text

I want to count the number of dates in say A2 to A300 (may have blanks)
and then count the how many in current year 2006.

Would like it to return something like "There are 200 entries in
current year out of 299".

Thanks in advance

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562126


Hi,

Maybe you can use something like:

="There are
"&SUMPRODUCT(--(RIGHT(TEXT(A2:A300,"dd/mm/yyyy"),4)="2006"))&" entries
in current year out of "&COUNTA(A2:A300)

Regards,
Bondi

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Function - Counting Years in range


Thanks

Worked a treat.

I got the right function and count function part but it was how to sum
them that stump me was trying Countif

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562126

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Function - Counting Years in range

Another alternative...
=SUMPRODUCT(--(TEXT(A2:A300,"yyyy")="2006"))
or
=SUMPRODUCT(--(year(A2:A300)=2006))



Bondi wrote:

VBA Noob wrote:
Hi,

I've got a list of around 300 dates Format e.g 01/07/2006 for different
years. Also some entries have ' in front of them to make them text

I want to count the number of dates in say A2 to A300 (may have blanks)
and then count the how many in current year 2006.

Would like it to return something like "There are 200 entries in
current year out of 299".

Thanks in advance

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562126


Hi,

Maybe you can use something like:

="There are
"&SUMPRODUCT(--(RIGHT(TEXT(A2:A300,"dd/mm/yyyy"),4)="2006"))&" entries
in current year out of "&COUNTA(A2:A300)

Regards,
Bondi


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Function - Counting Years in range


Thanks Dave


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562126

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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
function problem regarding cell range chindo Excel Worksheet Functions 1 November 10th 05 03:06 AM
Function to determine if any cell in a range is contained in a given cell [email protected] Excel Worksheet Functions 3 February 7th 05 04:19 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
Counting Function Dilemma Simon Lloyd Excel Worksheet Functions 0 November 8th 04 03:13 PM


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

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

About Us

"It's about Microsoft Excel"