# Formula help. INDEX MATCH???

#### MCallan1

##### New Member
Hi

I am trying to find the closest contact date after a given referral date. It is based on a specific ID for each person. As you can see below, the sample I am trying to work it out for is all for one ID. I need a formula to brink back the first Contact Date AFTER the referral date which in this case is:

Ref date: 19/07/2015 04:21

I have added the column of referral date minus the contact date and if this is used, it will need to be the MAX of the negative values.

Any help would be very much appreciated.
 ID Contact Dates Ref date-Contact Date 813013 08/07/2015 21:10 10.29930556 813013 10/07/2015 13:31 8.618055556 813013 19/07/2015 17:40 -0.554861111 813013 20/07/2015 12:00 -1.31875 813013 30/07/2015 11:10 -11.28402778

<TBODY>
</TBODY><COLGROUP><COL><COL span=2></COLGROUP>

### Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
This will work. Placing your table in A1:B6 (you don't really need the other column) then place the ID in D1 and the referall date in D2:

=MIN(IF(\$A\$2:\$A\$6=\$D\$1,IF(\$B\$2:\$B\$6>\$D\$2,\$B\$2:\$B\$6)))

Enter CNTL-SHIFT-ENTER

This helps for the sample I provided, thanks. I need to feed this into my much bigger spreadsheet that will have a large number of IDs and changing referral dates. It also wont be a definite number of contact dates as there could be any number of dates coming through in my report. Do you know how to do the same thing for much bigger quantities of data?

That will do any length of data provided you change the ranges.

Yes it worked thank you so much!

Replies
12
Views
445
Replies
0
Views
268
Replies
9
Views
297
Replies
2
Views
578
Replies
8
Views
494

1,211,697
Messages
6,103,359
Members
447,861
Latest member
LllopezXC

### 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.

### Which adblocker are you using?

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

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