Date Comparisons With Time Limits

Biggs1001

New Member
Joined
Jan 16, 2019
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hey all,


I did a search but the 'If' function is able to encompass so much I wasn't successful in finding what I'm looking to do - forgive me if I just missed it (or I'm not looking for the right function to efficiently show what I need - a real possibility!)

I have a list of projects that I need to find out what projects have a Ground Breaking Date and of those that have a Ground Breaking Date, which ones haven't completed construction yet - but with all of this I need to figure out what date would be 10 years post Ground Breaking Date of those that fit the above bill.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Project Number
[/TD]
[TD]Ground Breaking Date
[/TD]
[TD]Construction End Date
[/TD]
[TD]Grand Opening Date
[/TD]
[/TR]
[TR]
[TD]A12345[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B12345[/TD]
[TD]1/1/1990[/TD]
[TD]9/15/2000[/TD]
[TD]7/30/2001[/TD]
[/TR]
[TR]
[TD]C12345[/TD]
[TD]5/1/1998[/TD]
[TD]7/11/2004[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D12345[/TD]
[TD]3/1/2000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E12345[/TD]
[TD]10/1/1997[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]F12345[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]G12345[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]H12345[/TD]
[TD]8/1/1994[/TD]
[TD]1/18/1999[/TD]
[TD]11/11/1999[/TD]
[/TR]
[TR]
[TD]I12345[/TD]
[TD]12/1/2001[/TD]
[TD]4/14/2008[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


So in the above table I want to add a column after the Grand Opening Date that I would put my function into that would look at the Ground Breaking column and see that projects D12345 and E12345 both have Ground Breaking Dates yet no Construction End Dates, would flag that with the date that is 10 years from the Ground Breaking Date. The other projects would be ignored (as they either do not have a Ground Breaking Date or they have one but have a Construction End Date as well)

Is the If function what I'm needing?

Any help would be appreciated - I can do it by hand and just fill in those that need a 10 year date but with 1400 lines of projects, I'm hoping there's a more efficient way

Thanks in advance!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about

Excel 2013/2016
ABCDE
1Project NumberGround Breaking DateConstruction End DateGrand Opening Date10 years
2A12345 
3B1234501/01/199015/09/200030/07/2001
4C1234501/05/199811/07/2004
5D1234501/03/200001/03/2010
6E1234501/10/199701/10/2007
7F12345
8G12345
9H1234501/08/199418/01/199911/11/1999
10I1234501/12/200114/04/2008
Sheet1
Cell Formulas
RangeFormula
E2=IF(B2="","",IF(C2="",DATE(YEAR(B2)+10,MONTH(B2),DAY(B2)),""))
 
Upvote 0
Solution
How about
Excel 2013/2016
ABCDE
Project NumberGround Breaking DateConstruction End DateGrand Opening Date10 years
A12345
B12345
C12345
D12345
E12345
F12345
G12345
H12345
I12345

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]01/01/1990[/TD]
[TD="align: right"]15/09/2000[/TD]
[TD="align: right"]30/07/2001[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]01/05/1998[/TD]
[TD="align: right"]11/07/2004[/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]01/03/2000[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]01/03/2010[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]01/10/1997[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]01/10/2007[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]01/08/1994[/TD]
[TD="align: right"]18/01/1999[/TD]
[TD="align: right"]11/11/1999[/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]01/12/2001[/TD]
[TD="align: right"]14/04/2008[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TD="align: left"]=IF(B2="","",IF(C2="",DATE(YEAR(B2)+10,MONTH(B2),DAY(B2)),""))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

You're amazing Fluff - thanks!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Ground Breaking Date and of those that have a Ground Breaking Date, which ones haven't completed construction yet

you can use
=AND(B2<>"",C2="")
to test if there is a Ground Breaking Date but NO completed construction

So we could out that into an IF test

=IF(
AND(B2<>"",C2="") , If true then add 10 years to Ground Breaking Date B2

=date(Year(B2)+10, Month(B2), Day(B2))

if its not true then leave blank

would
=IF( AND(B2<>"",C2="") , date(Year(B2)+10, Month(B2), Day(B2)) ,"")
work

 
Upvote 0
opps , went off for dinner and didn't refresh
 
Upvote 0
you can use
=AND(B2<>"",C2="")
to test if there is a Ground Breaking Date but NO completed construction

So we could out that into an IF test

=IF(
AND(B2<>"",C2="") , If true then add 10 years to Ground Breaking Date B2

=date(Year(B2)+10, Month(B2), Day(B2))

if its not true then leave blank

would
=IF( AND(B2<>"",C2="") , date(Year(B2)+10, Month(B2), Day(B2)) ,"")
work


Thanks for taking the time to help out E!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top