Auto arrange dates formula

Tarun123

New Member
Joined
Mar 11, 2017
Messages
2
Hi,

I have a set of dates and data linked to each other. Eg:


Column A Column B Column C Column D
02/01/17 AAB 01/01/17 AAD
04/01/17 AAC 02/01/17 AAB
01/01/17 AAD 03/01/17 AAE
03/01/17 AAE 04/01/17 AAC


So on and so forth. The dates input in column A would keep changing every week, as a input by me.i.e AAB linked to 02/01/17 might change to 02/03/17, AAC linked to 04/01/17 might change to 03/03/17.

1) I would like to write a formula to arrange the dates from the oldest to newest date to appear in Column C & corresponding data from B to Column D(aab etc data).

I don't want to use the sort function since that rearranges the Column C & D every time I sort Column A from oldest to newest.

Any ideas/solutions would be much appreciated?

Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Because dates are really numerical values, it is easy to sort them by formula. In C1 enter:

=MIN(A:A)

In C2 enter the Array Formula:

=MIN(IF(A:A>C1,A:A))

and copy down. This effectively sorts column A. Finally in D1 enter:

=INDEX(B:B,MATCH(C1,A:A,0))

and copy down.
 
Upvote 0
Hey. Thanks, this works perfectly.

What do i need to change if there are 2 or more dates in Column A which are the same?
 
Upvote 0

Forum statistics

Threads
1,214,594
Messages
6,120,436
Members
448,964
Latest member
Danni317

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