Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Help With Formula For Date Comparison

Hello -

Can anyone help me with a formula involving dates? I'm stumped. . .

I need to write the formula in cell A1. The formula needs to compare
today's date (in cell A2) with dates entered in calls A4 and A5. If
today's date in A2 is equal to or between the dates in cells A4 and
A5, AND if cell A8 which contains notes is blank, then the formula
result should display "Extract". If these conditions are not met,
then the formula result should display "Not Extract".

Examples of what I am looking for are shown below:

EXAMPLE 1
A1 A2 A4 A5 A8
Extract 9/6/07 9/4/07 9/24/07

EXAMPLE 2
A1 A2 A4 A5 A8
Not Extract 9/6/07 9/4/07 9/24/07 received via e-mail



Thanks!


Sandi

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Help With Formula For Date Comparison

See if this formula does what your asking:

=IF(AND(OR(AND(TODAY()=A2,TODAY()=A3),AND(TODAY() =A2,TODAY()<=A3)),NOT(ISBLANK(A5))),"Extract","Not Extract")
--
Kevin Backmann


"foofoo" wrote:

Hello -

Can anyone help me with a formula involving dates? I'm stumped. . .

I need to write the formula in cell A1. The formula needs to compare
today's date (in cell A2) with dates entered in calls A4 and A5. If
today's date in A2 is equal to or between the dates in cells A4 and
A5, AND if cell A8 which contains notes is blank, then the formula
result should display "Extract". If these conditions are not met,
then the formula result should display "Not Extract".

Examples of what I am looking for are shown below:

EXAMPLE 1
A1 A2 A4 A5 A8
Extract 9/6/07 9/4/07 9/24/07

EXAMPLE 2
A1 A2 A4 A5 A8
Not Extract 9/6/07 9/4/07 9/24/07 received via e-mail



Thanks!


Sandi


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Help With Formula For Date Comparison

Does this do what you want?

=IF(AND(A2=A4,A2<=A5,A8=""),"Extract","Not Extract")

Rick


"foofoo" wrote in message
oups.com...
Hello -

Can anyone help me with a formula involving dates? I'm stumped. . .

I need to write the formula in cell A1. The formula needs to compare
today's date (in cell A2) with dates entered in calls A4 and A5. If
today's date in A2 is equal to or between the dates in cells A4 and
A5, AND if cell A8 which contains notes is blank, then the formula
result should display "Extract". If these conditions are not met,
then the formula result should display "Not Extract".

Examples of what I am looking for are shown below:

EXAMPLE 1
A1 A2 A4 A5 A8
Extract 9/6/07 9/4/07 9/24/07

EXAMPLE 2
A1 A2 A4 A5 A8
Not Extract 9/6/07 9/4/07 9/24/07 received via e-mail



Thanks!


Sandi


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Help With Formula For Date Comparison

"Rick Rothstein (MVP - VB)" wrote in
message ...
Is there a benefit to using the single MEDIAN comparison as opposed to
AND'ing two comparisons?



Only when you miss out the A8="" <g

--
REgards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Rick Rothstein (MVP - VB)" wrote in
message ...
You left out the A8="" condition.

Is there a benefit to using the single MEDIAN comparison as opposed to
AND'ing two comparisons?

Rick


"Sandy Mann" wrote in message
...
Another way adapting one of Harlan's formuals:

=IF(MEDIAN(A2,A3,A4)=A2,"Exact","Not exact")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Rick Rothstein (MVP - VB)" wrote in
message ...
Does this do what you want?

=IF(AND(A2=A4,A2<=A5,A8=""),"Extract","Not Extract")

Rick


"foofoo" wrote in message
oups.com...
Hello -

Can anyone help me with a formula involving dates? I'm stumped. . .

I need to write the formula in cell A1. The formula needs to compare
today's date (in cell A2) with dates entered in calls A4 and A5. If
today's date in A2 is equal to or between the dates in cells A4 and
A5, AND if cell A8 which contains notes is blank, then the formula
result should display "Extract". If these conditions are not met,
then the formula result should display "Not Extract".

Examples of what I am looking for are shown below:

EXAMPLE 1
A1 A2 A4 A5 A8
Extract 9/6/07 9/4/07 9/24/07

EXAMPLE 2
A1 A2 A4 A5 A8
Not Extract 9/6/07 9/4/07 9/24/07 received via e-mail



Thanks!


Sandi









  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Help With Formula For Date Comparison

You left out the A8="" condition.

Is there a benefit to using the single MEDIAN comparison as opposed to
AND'ing two comparisons?


Only when you miss out the A8="" <g


Oh... LOL

Rick
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
Date comparison TomD Excel Discussion (Misc queries) 4 February 20th 07 10:37 PM
date comparison help CathyZ Excel Discussion (Misc queries) 5 May 4th 06 11:53 AM
Date comparison Darkdrew Excel Worksheet Functions 7 March 23rd 06 04:22 PM
Date Comparison Calculation PAR Excel Worksheet Functions 2 March 22nd 06 05:18 PM
Date comparison Jonibenj Excel Discussion (Misc queries) 6 October 23rd 05 08:34 PM


All times are GMT +1. The time now is 05:24 AM.

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"