Tuesday, July 23, 2019

macros - Excel sort dates to be in oldest to newest without changing grouping

I have a list of customers with due dates and corresponding payment dates but the payment dates weren't updated in the correct order. Is there a way I can sort the payment date to be in order without changing the order of the customer and their original due dates? Either thru a look up that can get the dates in order or thru a macro. I've tried using a large on index match but was unsuccessful. Any help would be great!



Data set looks like this



CUSTOMER, DUE DATE, PAYMENT DATE

Toni, 1-Jan 17, 17-Mar-17

Toni, 16-Jan 17, 2-Mar-17
Toni, 31-Jan-17, 1-Jan-17
Toni, 15-Feb-17, 1-Apr-17
Rr, 7-Jan-17, 15-Feb-17
Rr, 22-Jan-17, 16-Jan-17
Rr, 6-Feb-17, 31-Jan-17


End result should look like this




CUSTOMER, DUE DATE, PAYMENT DATE
Toni, 1-Jan 17, 1-Jan-17
Toni , 16-Jan 17, 2-Mar-17
Toni , 31-Jan-17, 17-Mar-17
Toni , 15-Feb-17, 1-Apr-17
Rr, 7-Jan-17, 16-Jan-17
Rr, 22-Jan-17, 31-Jan-17
Rr, 6-Feb-17, 15-Feb-17



Apologies in advance for the poor formatting as I'm still new.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...