Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default finding a formula to help with dates.

Hi I am trying to work out a formula to work out the following problem.

If "cell 1" is a later date then "cell 2" then "cell 3" is to be "older"
If "cell 2" is a later date then "cell 1" then "cell 3 is "the number of
days between them"
If "cell 2" has no date then "cell 3" remains blank.

If anyone can help me work this one out, I would greatly appreciate it.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default finding a formula to help with dates.

Using C1 for "cell 1" and C2 for "cell 2", put this in "cell 3"...

=IF(C2="","",IF(C1C2,"Other",C2-C1))

If C1 and C2 are incorrect, simply change them to your cell 1 and 2
references.

Rick


"Redsphynx" wrote in message
...
Hi I am trying to work out a formula to work out the following problem.

If "cell 1" is a later date then "cell 2" then "cell 3" is to be "older"
If "cell 2" is a later date then "cell 1" then "cell 3 is "the number of
days between them"
If "cell 2" has no date then "cell 3" remains blank.

If anyone can help me work this one out, I would greatly appreciate it.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default finding a formula to help with dates.

Ok, this has worked perfectly. I have slightly modified it to:

If "E4" is a later date then "G4" then "cell 3" is to be "OLDER"
If "G4" is a later date then "E4" then "cell 3 is "the number of days
between them"
If "G4" OR "E4" has no date then "cell 3" remains blank.

=IF(E4="","",IF(G4="","",IF(E4G4,"Other",G4-E4)))

What I want to do now is...

If "G4" is blank then I need to calculate how many days has elapsed till
today (or what ever date we open file in the future"

I hope this makes sense.

Thanks
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default finding a formula to help with dates.

How many days has elapse from when? Assuming you mean from E4...

=IF(E4="","",IF(G4="",TODAY()-E4,IF(E4G4,"Other",G4-E4)))

Rick


"Redsphynx" wrote in message
...
Ok, this has worked perfectly. I have slightly modified it to:

If "E4" is a later date then "G4" then "cell 3" is to be "OLDER"
If "G4" is a later date then "E4" then "cell 3 is "the number of days
between them"
If "G4" OR "E4" has no date then "cell 3" remains blank.

=IF(E4="","",IF(G4="","",IF(E4G4,"Other",G4-E4)))

What I want to do now is...

If "G4" is blank then I need to calculate how many days has elapsed till
today (or what ever date we open file in the future"

I hope this makes sense.

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default finding a formula to help with dates.

Thanks once again Rick. Fantastic job !!!!!

"Rick Rothstein (MVP - VB)" wrote:

How many days has elapse from when? Assuming you mean from E4...

=IF(E4="","",IF(G4="",TODAY()-E4,IF(E4G4,"Other",G4-E4)))

Rick


"Redsphynx" wrote in message
...
Ok, this has worked perfectly. I have slightly modified it to:

If "E4" is a later date then "G4" then "cell 3" is to be "OLDER"
If "G4" is a later date then "E4" then "cell 3 is "the number of days
between them"
If "G4" OR "E4" has no date then "cell 3" remains blank.

=IF(E4="","",IF(G4="","",IF(E4G4,"Other",G4-E4)))

What I want to do now is...

If "G4" is blank then I need to calculate how many days has elapsed till
today (or what ever date we open file in the future"

I hope this makes sense.

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default finding a formula to help with dates.

Dates in Excel are numbers. Jan. 1, 1900 is day 1, Dec 31, 9999 is day
2,958,465. The cells need to be formatted as dates for you so see a date. If
you format the cells as numbers, you will see a number.
To answer your question if date 1 is in cell A1 and date 2 is in cell A2
then in cell A3
=IF(A2="","",IF(A1A2,"older",IF(A2A1,A2-A1,"?")))
You did not state what to return if the dates are equal, so I returned a ?
The formula presumes there are numbers in A1 and A2 or an empty cell in A2

Tyro


"Redsphynx" wrote in message
...
Hi I am trying to work out a formula to work out the following problem.

If "cell 1" is a later date then "cell 2" then "cell 3" is to be "older"
If "cell 2" is a later date then "cell 1" then "cell 3 is "the number of
days between them"
If "cell 2" has no date then "cell 3" remains blank.

If anyone can help me work this one out, I would greatly appreciate it.

Thanks.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default finding a formula to help with dates.

Hi,

Try something like this:

=IF(OR(B1="",A1=B1),"",IF(A1B1,"Older",B1-A1))

if the 2 dates are equal or date 2 is blank then the formula will return a
blank!

Hope this helps!
Jean-Guy

"Redsphynx" wrote:

Hi I am trying to work out a formula to work out the following problem.

If "cell 1" is a later date then "cell 2" then "cell 3" is to be "older"
If "cell 2" is a later date then "cell 1" then "cell 3 is "the number of
days between them"
If "cell 2" has no date then "cell 3" remains blank.

If anyone can help me work this one out, I would greatly appreciate it.

Thanks.

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
Finding MIN value in a column between Two Dates in different columns ML Srini Excel Worksheet Functions 3 October 28th 07 03:14 AM
Finding the oldest & newest dates Bob Smith Excel Worksheet Functions 3 April 13th 07 02:27 PM
Finding Certain Dates T_Sr via OfficeKB.com New Users to Excel 2 February 11th 07 01:09 AM
Help finding dates July thru June lawdoggy Excel Worksheet Functions 0 February 7th 06 08:26 PM
Finding data by dates [email protected] Excel Worksheet Functions 3 October 4th 05 07:54 AM


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