Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default How can I check whether a column of dates are all before today's d

I'm working in Excel 2007.

I've got a column of dates, and I need to check the column as a whole to
ensure that every date is prior to today's date.

E.g. if today's date is 10/19/2007, and my column is the following:
8/17/1940
4/15/2007
10/18/2007
.... the data is okay; 0 of the dates violate the rule. However, if the
column is the following:
8/17/1940
4/15/2007
10/20/2007
.... then it's not okay, because a date (the third) violates the rule - it
falls after today's date.

I thought I could do it using COUNTIF(A:A,"TODAY()"), where A is the column
of dates, but that function always returns a 0 value, no matter whether the
dates are okay or not. If I replace TODAY() with a date, it works - for some
reason, it just won't recognize and evaluate the TODAY() function.

What am I doing wrong? I appreciate the help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I check whether a column of dates are all before today's d

Try this:

=COUNTIF(A:A,"<"&TODAY())=COUNT(A:A)

The result will be either TRUE or FALSE.

--
Biff
Microsoft Excel MVP


"PaladinWhite" wrote in message
...
I'm working in Excel 2007.

I've got a column of dates, and I need to check the column as a whole to
ensure that every date is prior to today's date.

E.g. if today's date is 10/19/2007, and my column is the following:
8/17/1940
4/15/2007
10/18/2007
... the data is okay; 0 of the dates violate the rule. However, if the
column is the following:
8/17/1940
4/15/2007
10/20/2007
... then it's not okay, because a date (the third) violates the rule - it
falls after today's date.

I thought I could do it using COUNTIF(A:A,"TODAY()"), where A is the
column
of dates, but that function always returns a 0 value, no matter whether
the
dates are okay or not. If I replace TODAY() with a date, it works - for
some
reason, it just won't recognize and evaluate the TODAY() function.

What am I doing wrong? I appreciate the help!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default How can I check whether a column of dates are all before today

Works great! (Now I've just gotta figure out WHY!)

Yay, an opportunity to learn something new.

Thanks again!

"T. Valko" wrote:

Try this:

=COUNTIF(A:A,"<"&TODAY())=COUNT(A:A)

The result will be either TRUE or FALSE.

--
Biff
Microsoft Excel MVP


"PaladinWhite" wrote in message
...
I'm working in Excel 2007.

I've got a column of dates, and I need to check the column as a whole to
ensure that every date is prior to today's date.

E.g. if today's date is 10/19/2007, and my column is the following:
8/17/1940
4/15/2007
10/18/2007
... the data is okay; 0 of the dates violate the rule. However, if the
column is the following:
8/17/1940
4/15/2007
10/20/2007
... then it's not okay, because a date (the third) violates the rule - it
falls after today's date.

I thought I could do it using COUNTIF(A:A,"TODAY()"), where A is the
column
of dates, but that function always returns a 0 value, no matter whether
the
dates are okay or not. If I replace TODAY() with a date, it works - for
some
reason, it just won't recognize and evaluate the TODAY() function.

What am I doing wrong? I appreciate the help!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How can I check whether a column of dates are all before today

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"PaladinWhite" wrote in message
...
Works great! (Now I've just gotta figure out WHY!)

Yay, an opportunity to learn something new.

Thanks again!

"T. Valko" wrote:

Try this:

=COUNTIF(A:A,"<"&TODAY())=COUNT(A:A)

The result will be either TRUE or FALSE.

--
Biff
Microsoft Excel MVP


"PaladinWhite" wrote in message
...
I'm working in Excel 2007.

I've got a column of dates, and I need to check the column as a whole
to
ensure that every date is prior to today's date.

E.g. if today's date is 10/19/2007, and my column is the following:
8/17/1940
4/15/2007
10/18/2007
... the data is okay; 0 of the dates violate the rule. However, if the
column is the following:
8/17/1940
4/15/2007
10/20/2007
... then it's not okay, because a date (the third) violates the rule -
it
falls after today's date.

I thought I could do it using COUNTIF(A:A,"TODAY()"), where A is the
column
of dates, but that function always returns a 0 value, no matter whether
the
dates are okay or not. If I replace TODAY() with a date, it works - for
some
reason, it just won't recognize and evaluate the TODAY() function.

What am I doing wrong? I appreciate the help!






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
How do I set up a column in Excel as a check mark column? wrsstevens Excel Discussion (Misc queries) 7 April 10th 07 07:12 PM
Check dates in spreadsheet against expiry years column and change colour [email protected] Excel Worksheet Functions 4 January 22nd 07 05:14 AM
count the number of cells within a column with a date <= today's d Cachod1 New Users to Excel 2 January 27th 06 11:24 PM
How to check for duplicates in a list of names and dates Robert,MofD Excel Discussion (Misc queries) 5 April 30th 05 11:54 PM
Check column of dates against todays date Andrew82 Excel Worksheet Functions 1 April 15th 05 11:17 AM


All times are GMT +1. The time now is 11:36 PM.

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"