Bring the first date prior to a date

phil133

Active Member
Joined
May 5, 2015
Messages
257
Office Version
  1. 365
Platform
  1. Windows
Hi. I have a column (A) with dates sorted by oldest to nearest. I also have another column (B) with dates but with gaps of 4 or 5 weeks between them. I would like to have a formula on another column that will bring me the first date in column B if that date is prior to column A.
An example so you can understand.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]18/1/2006[/TD]
[TD]17/1/2006[/TD]
[TD]14/2/2006[/TD]
[/TR]
[TR]
[TD]19/1/2006[/TD]
[TD]14/2/2006[/TD]
[TD]14/2/2006[/TD]
[/TR]
[TR]
[TD]10/2/2006[/TD]
[TD]14/3/2006[/TD]
[TD]14/2/2006[/TD]
[/TR]
[TR]
[TD]13/2/2006[/TD]
[TD]18/4/2006[/TD]
[TD]14/2/2006[/TD]
[/TR]
[TR]
[TD]14/2/2006[/TD]
[TD]16/5/2006[/TD]
[TD]14/3/2006[/TD]
[/TR]
[TR]
[TD]15/2/2006[/TD]
[TD]20/6/2006[/TD]
[TD]14/3/2006[/TD]
[/TR]
[TR]
[TD]13/3/2006[/TD]
[TD]18/7/2006[/TD]
[TD]14/3/2006[/TD]
[/TR]
[TR]
[TD]14/3/2006[/TD]
[TD]15/8/2006[/TD]
[TD]18/4/2006[/TD]
[/TR]
[TR]
[TD]15/3/2006[/TD]
[TD]19/9/2006[/TD]
[TD]18/4/2006[/TD]
[/TR]
</tbody>[/TABLE]
Column C is my goal. C1 is 14/2/2006 because A1 is after B1. So he looks at B2 which is after A1 so it's good. C2 the same logic. C5 is 14/3/2006 because A5 is 14/2/2006 which is not prior to 14/2/2006 (When it's the same date I would like the next date). etc.

Hope you understand what I'm trying to do!
Thanks for any help!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi, is this it maybe?


Excel 2013/2016
ABC
1ABC
218/01/200617/01/200614/02/2006
319/01/200614/02/200614/02/2006
410/02/200614/03/200614/02/2006
513/02/200618/04/200614/02/2006
614/02/200616/05/200614/03/2006
715/02/200620/06/200614/03/2006
813/03/200618/07/200614/03/2006
914/03/200615/08/200618/04/2006
1015/03/200619/09/200618/04/2006
Sheet1
Cell Formulas
RangeFormula
C2=INDEX($B$2:$B$10,MATCH(TRUE,INDEX($B$2:$B$10>A2,0),0))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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