Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default counting dates within a rnage

hi i have a list of dates some in the past some in the present. I am
trying to total up the dates that are in the future, but it keeps
returning an inaccurate number. heres the code I am using. Any ideas
or tips would be great

sub
range("a1").select
do until activecell = ""
if activecell date then
total = total+1
end if
activecell.offset(1,0).select
loop
range("b1") = total

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default counting dates within a rnage

Guessing a bit, but maybe

sub
range("a1").select
do until activecell = ""
If IsDate(Activecell.Value) Then
if activecell date then
total = total+1
end if
End If
activecell.offset(1,0).select
loop
range("b1") = total


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
hi i have a list of dates some in the past some in the present. I am
trying to total up the dates that are in the future, but it keeps
returning an inaccurate number. heres the code I am using. Any ideas
or tips would be great

sub
range("a1").select
do until activecell = ""
if activecell date then
total = total+1
end if
activecell.offset(1,0).select
loop
range("b1") = total



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default counting dates within a rnage

Hi John,

As a first step, following formula will do the job :
=COUNTIF(A1:A10,"06.03.2006")

if all your dates are located in A1:A10 range,
and if today is your reference point ...

HTH
Cheers
Carim

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 occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting dates, within a list of dates jrheinschm Excel Worksheet Functions 7 April 19th 06 06:13 PM
Rnage Finder JosephC Excel Worksheet Functions 1 February 21st 06 12:33 AM
Counting Dates Jerry Excel Worksheet Functions 1 March 8th 05 02:01 PM
summing data that match critieria in a rnage sandyix Excel Discussion (Misc queries) 4 February 21st 05 01:39 AM


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