Correct dates inserted into incorrect fields in table.

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
I have a table that has serial numbers with dates that show when a job was entered, the date it was closed and the date it was installed. The Date of the installation is on the incorrect line and I would like to have it put onto the correct line. How can I do this in Access without going thru every line manually? Below is an example of one serial number with multiple entries.


BarCodeDate_EntDate_ClsDate_Warranty
A-320618
6/2/2017​
6/13/2017
A-320618
3/1/2018​
4/25/20185/11/2018
A-320618
5/16/2018​
6/1/20188/28/2018
A-320618
9/6/2018​
10/3/2018

I would like to have them lined up like this. I have over 73000 entries to go thru. The Date Warranty needs to be greater than the previous Date Cls but less than the next Date Ent.

BarCodeDate_EntDate_ClsDate_Warranty
A-320618
6/2/2017​
6/13/2017
A-320618
3/1/2018​
4/25/2018
A-320618
5/16/2018​
6/1/20185/11/2018
A-320618
9/6/2018​
10/3/20188/28/2018
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Given the criteria you've provided, 8/28/2018 would fit in both bottom rows.

How are you deciding which value to use when more than one will work?
 
Upvote 0
JonXL. The criteria is that the Date Warranty is greater than the Date Cls but less than the next Date Ent. 8/28/2018 has a greater date than the previous three lines but is only less that the last lines Date_Ent, 9/6/2018. By this criteria it will only fit in the last line.

Thanks
 
Upvote 0
9/6/2018 happens to be not just the "next" Date_Ent but also the "last" Date_Ent.

I think we need a definition of previous and next. For instance, in this case it looks like you have "previous" looking at other rows but "next" looking at the same row.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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