Time between 2 dates, 1 date needs to be pulled from a range of cells

JoeG2124

New Member
Joined
Sep 1, 2017
Messages
8
[TABLE="width: 1024"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]N
[/TD]
[TD]O
[/TD]
[TD]P
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]January
[/TD]
[TD]February
[/TD]
[TD]March
[/TD]
[TD]April
[/TD]
[TD]May
[/TD]
[TD]June
[/TD]
[TD]July
[/TD]
[TD]August
[/TD]
[TD]September
[/TD]
[TD]October
[/TD]
[TD]November
[/TD]
[TD]December
[/TD]
[TD]Month of last Visit
[/TD]
[TD]Past Due?
[/TD]
[TD]Extention Approved
[/TD]
[/TR]
[TR]
[TD]Tom
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]May-17
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]May-16
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mike
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Nov-17
[/TD]
[TD][/TD]
[TD]Oct-16
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Harry
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Aug-17
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Sep-16
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]So this may be a bit confusing….. In O3-O5 (Past Due Column), I want it to say "Yes/No", however, I want that to come from the difference between the two dates in row 3 (for "tom", column F and N), N is always the EARLIER date.
[/TD]
[/TR]
[TR]
[TD="colspan: 14"]If the difference is 12 months or above, I want it to automatically populate as "Yes" and if it is 11 months or below I want it to populate as "No".
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]Since the "newer" date is not always in the same column (month), I need the function to be able to determine the one cell in the row that is populated. There will only ever be one cell populated (from column B-M) for each name.
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 16"]Me writing out in words for row 3 is like this, "if the difference between N3 and the cell populated between B3 and M3 is greater than or equal to 12, then YES. If the difference between N3 and the cell populated between B3 and M3 is less than 12, then NO"
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 7"]So for Tom and Mike, it should say "Yes", since it has been 12+ months.
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 7"]For Harry, it should say "No", since it has only been 11 months.
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 15"]I don't know if this is even possible to do but this is hurting my brain. So I need help before I go insane because I will not stop trying/looking for an answer.

(I hope this doesn't look awful when posted, can't add gridlines)
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
you could use
=DATEDIF(N3,MAX(C3:M3),"Y")
if its a 1 then its 1 year

=if ( DATEDIF(N3,MAX(C3:M3),"Y") >0 , "Yes", "No")
 
Last edited:
Upvote 0
Excel Workbook
ABCDEFGHIJKLMNOPQR
2JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberMonth of last VisitPast Due?Extention Approved
3TomMay-17May-16yes1
4MikeNov-17Oct-16yes1
5HarryAug-17Sep-16no0
Sheet1
 
Upvote 0
Thank you @etaf! I appreciate the help. Worked perfectly.

I am trying to get better with Excel, this site is awesome.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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