ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Then Statement Help (https://www.excelbanter.com/excel-discussion-misc-queries/68296-if-then-statement-help.html)

Joanne

If Then Statement Help
 
I need help, I'm trying to put a formula in place for the following:

Date A: 1/1/2001
Date B: 12/31/2004
Date C: 1/1/2007

If Date B minus Date C (in numbers) is greater than Date C minus Date B than
I want it to take Date A and add the difference between Date B - Date A (in
#'s) and Date C - Date B (in #'s) to come up with a new date

If Date C minus Date B is greater than Date B minus Date A, I want to return
Date C

I hope this makes sense

Bob Phillips

If Then Statement Help
 
=IF(DATE_BDATE_C,DATE_C-DATE_A,DATE_A)

I think, but I got a bit confused.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Joanne" wrote in message
...
I need help, I'm trying to put a formula in place for the following:

Date A: 1/1/2001
Date B: 12/31/2004
Date C: 1/1/2007

If Date B minus Date C (in numbers) is greater than Date C minus Date B

than
I want it to take Date A and add the difference between Date B - Date A

(in
#'s) and Date C - Date B (in #'s) to come up with a new date

If Date C minus Date B is greater than Date B minus Date A, I want to

return
Date C

I hope this makes sense




Joanne

If Then Statement Help
 
Hi Bob,

Maybe this is clearer:
Cell A1 1/1/04
A2 12/31/04
A3 1/1/07

If A2-A1 = 1460
A3-A2 = 731
Since A2-A1 is greater than A3-A2 I want to take the difference from
1460-731 (729) and add that to 1/1/04 to make a new date of 12/31/02 but if
the difference between A2-A1 and A3-A2 is negative, I want to return A3 as
the date.
Thanks

"Bob Phillips" wrote:

=IF(DATE_BDATE_C,DATE_C-DATE_A,DATE_A)

I think, but I got a bit confused.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Joanne" wrote in message
...
I need help, I'm trying to put a formula in place for the following:

Date A: 1/1/2001
Date B: 12/31/2004
Date C: 1/1/2007

If Date B minus Date C (in numbers) is greater than Date C minus Date B

than
I want it to take Date A and add the difference between Date B - Date A

(in
#'s) and Date C - Date B (in #'s) to come up with a new date

If Date C minus Date B is greater than Date B minus Date A, I want to

return
Date C

I hope this makes sense






All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com