Find the first date after, a specified date

Shodi

Board Regular
Joined
May 24, 2016
Messages
53
Hi, this is teh first time I am posting on this site. I have been here before have has found help in figuring out complex calculations. So I am here again, this time as a member, requesting help to figure out a formula that has me baffled.

I have a whole spreadsheet full of data like that given below.
It shows the date someone was called in column B and the date the person attended in Column C.
As you can see the "Call Date" for all unique "Names" are identical where as the "Attended Date" varies.
What I need is to extract in a different sheet the "Attended Date" that is immediately after the "Call Date" for each unique individual.
E.g
A2= Fred, B2= 17-Jan-16, C2= 29-Jan-16 (the 1st date in "Attended Date" this is common for Fred, after 17-Jan-1)
A3= Hank, B3= 7-Feb-16, C3= 4-Mar-16 (the 1st date in "Attended Date" this is common for Hank, after 7-Feb-16)
A4= John, B4= 25-Feb-16, C4= 1-Mar-16 (the 1st date in "Attended Date" this is common for John, after 25-Feb-16)

and so on.

Please help, am on the clock.

[TABLE="width: 249"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Call Date[/TD]
[TD]Attended Date[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]11-Jan-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]29-Jan-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]13-Mar-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]14-Mar-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]14-Mar-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]1-Jan-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]4-Mar-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]22-Mar-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]2-Jan-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]9-Feb-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]1-Mar-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]6-Mar-16[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi, this is teh first time I am posting on this site. I have been here before have has found help in figuring out complex calculations. So I am here again, this time as a member, requesting help to figure out a formula that has me baffled.

I have a whole spreadsheet full of data like that given below.
It shows the date someone was called in column B and the date the person attended in Column C.
As you can see the "Call Date" for all unique "Names" are identical where as the "Attended Date" varies.
What I need is to extract in a different sheet the "Attended Date" that is immediately after the "Call Date" for each unique individual.
E.g
A2= Fred, B2= 17-Jan-16, C2= 29-Jan-16 (the 1st date in "Attended Date" this is common for Fred, after 17-Jan-1)
A3= Hank, B3= 7-Feb-16, C3= 4-Mar-16 (the 1st date in "Attended Date" this is common for Hank, after 7-Feb-16)
A4= John, B4= 25-Feb-16, C4= 1-Mar-16 (the 1st date in "Attended Date" this is common for John, after 25-Feb-16)

and so on.

Please help, am on the clock.

[TABLE="width: 249"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Call Date[/TD]
[TD]Attended Date[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]11-Jan-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]29-Jan-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]13-Mar-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]14-Mar-16[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]17-Jan-16[/TD]
[TD]14-Mar-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]1-Jan-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]4-Mar-16[/TD]
[/TR]
[TR]
[TD]Hank[/TD]
[TD]7-Feb-16[/TD]
[TD]22-Mar-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]2-Jan-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]9-Feb-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]1-Mar-16[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]25-Feb-16[/TD]
[TD]6-Mar-16[/TD]
[/TR]
</tbody>[/TABLE]
Hi Shodi, welcome to the boards.

The following array formula will give you the answer for Fred. An array formula needs to be entered with CTRL+SHIFT+ENTER not just ENTER or it will return a #Value! error.

Basically this formula is looking for the minimum date in column C where the name in column A is Fred and the date in column C is greater than the call date in B2. That should hopefully give you enough of an idea to work out how to find out the dates for Hank and John

=MIN(IF(A2:A13="Fred",IF(C2:C13>B2,C2:C13)))
 
Upvote 0
Dear Fishboy,

Thanks a lot. It is working for Fred. I'll try get it to work for the other too. Thank a lot.
 
Upvote 0
Dear Fishboy,

This will require me to manually change the requirements for each unique name. There are over 100,000 unique names.

What I need is a formula that does the below given logic.

Look for the value in C (Attended date), in the range of values in C that has a common value in A(name), that is the next greatest value to the common value in B (Call Date).
 
Upvote 0
Dear Fishboy,

This will require me to manually change the requirements for each unique name. There are over 100,000 unique names.

What I need is a formula that does the below given logic.

Look for the value in C (Attended date), in the range of values in C that has a common value in A(name), that is the next greatest value to the common value in B (Call Date).
Hmm, that is another matter entirely and significantly more complicated than your original post implied. It will require further testing at this end and I cannot guarantee I will have a solution for that.

Where are you expecting these results to be returned? I think the best place will be perhaps column D of each line as the cells can at least be referenced to get the names etc without the need to manually update every time.
 
Upvote 0
If you create a list of the unique names in say D2:D100, then you do
=MIN(IF(A$2:A$13=D2,IF(C$2:C$13>B7,C$2:C$13)))
And fill it down.

Creating the unique list is easy with the Advanced Filter - Unique items.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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