Combine different lines to display beside each other

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
147
I am not sure how to ask this question. I want to display two different date fields of data beside each other. They have the same unique serial number/barcode and the dates are on separate lines. I want to display them on the same line beside each other. The first example shows how the data looks. The second shows how I want to display it. How do I move the dates side by side?

RA_NumBarCodeDate_EntDate_Warranty
RS07030128A-2366397/3/20184/5/2019
RT05240124A-2366395/24/2019
RS12200076A-32554212/20/20184/15/2019
RT05290139A-3255425/29/2019
RT04100249A-3348694/10/20195/21/2019
RT05280281A-3348695/28/2019
RS08280184A-3356638/28/20181/31/2019
RT02060109A-3356632/6/20193/28/2019
RT02190119A-3357572/19/20193/14/2019
RT03190145A-3357573/19/20194/22/2019
RS12280034A-33578012/28/20183/8/2019
RT03220089A-3357803/22/20194/30/2019
RT03010142A-3369523/1/20194/29/2019
RT06050101A-3369526/5/2019
RT01070052A-3587731/7/20195/28/2019
RT05280161A-3587735/28/2019
RT01180090A-3602151/18/20194/26/2019
RT05020219A-3602155/2/20195/22/2019
RS09060234A-3604519/6/20182/20/2019
RT03010097A-3604513/1/20194/18/2019
RT01300086A-3606661/30/20194/25/2019
RT05120051A-3606665/12/2019
RT01210130A-3622141/21/20194/23/2019
RT04240052A-3622144/24/20195/20/2019
RT05220057A-3622145/22/2019
<colgroup><col width="94" style="width: 71pt; mso-width-source: userset; mso-width-alt: 3356;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2588;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2702;"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3555;"> <tbody> </tbody>


RA_NumBarCodeDate_EntDate_Warranty
RS07030128A-2366397/3/2018
RT05240124A-2366395/24/20194/5/2019
RS12200076A-32554212/20/2018
RT05290139A-3255425/29/20194/15/2019
RT04100249A-3348694/10/2019
RT05280281A-3348695/28/20195/21/2019
RS08280184A-3356638/28/2018
RT02060109A-3356632/6/20191/31/2019
RT02190119A-3357572/19/2019
RT03190145A-3357573/19/20193/14/2019
RS12280034A-33578012/28/2018
RT03220089A-3357803/22/20193/8/2019
RT03010142A-3369523/1/2019
RT06050101A-3369526/5/20194/29/2019
RT01070052A-3587731/7/2019
RT05280161A-3587735/28/20195/28/2019
RT01180090A-3602151/18/2019
RT05020219A-3602155/2/20194/26/2019
RS09060234A-3604519/6/2018
RT03010097A-3604513/1/20192/20/2019
RT01300086A-3606661/30/2019
RT05120051A-3606665/12/20194/25/2019
RT01210130A-3622141/21/2019
RT04240052A-3622144/24/20194/23/2019
RT05220057A-3622145/22/20195/20/2019
<colgroup><col width="99" style="width: 74pt; mso-width-source: userset; mso-width-alt: 3527;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2702;" span="2"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3555;"> <tbody> </tbody>
 

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
147
Maybe the only way to do this is in Excel and then put the table back into Access.
I am tying to figure mean time between failure. My formula is this: IF(AND(A3=A2,C2<>"",B3-C2>0),B3-C2,"N/A")

BarCodeDate_EntDate_WarrantyDifference
A-2366397/3/20184/5/201949
A-2366395/24/2019N/A
A-32554212/20/20184/15/201944
A-3255425/29/2019N/A
A-3348694/10/20195/21/20197
A-3348695/28/2019N/A
A-3356638/28/20181/31/20196
A-3356632/6/20193/28/2019N/A
A-3357572/19/20193/14/20195
A-3357573/19/20194/22/2019N/A
A-33578012/28/20183/8/201914
A-3357803/22/20194/30/2019N/A
A-3369523/1/20194/29/201937
A-3369526/5/2019N/A
A-3587731/7/20195/28/2019N/A
A-3587735/28/2019N/A
A-3602151/18/20194/26/20196
A-3602155/2/20195/22/2019N/A
A-3604519/6/20182/20/20199
A-3604513/1/20194/18/2019N/A
A-3606661/30/20194/25/201917
A-3606665/12/2019N/A
A-3622141/21/20194/23/20191
A-3622144/24/20195/20/20192
A-3622145/22/2019N/A
<colgroup><col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2247;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2702;"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3555;"> <col width="69" style="width: 52pt; mso-width-source: userset; mso-width-alt: 2446;"> <tbody> </tbody>
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,706
Office Version
  1. 2019
Platform
  1. Windows
This last post is dramatically different from the first one --

first post has four columns: RA_Num,BarCode,Date_Ent,Date_Warranty
last post has four columns: BarCode,Date_Ent,Date_Warranty,Difference

You will really have to restate what the problem is currently. You original said nothing about differences and only wanted side by side information. Are you now trying to do something different?

Note that it probably is possible to do this in Access. But it will not be done in Access as if in a spreadsheet - using formulas based on the position of the rows and columns. However, if you want to export the data to Excel you certainly can implement this as a solution.
 

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
147
It is my mistake. I am trying to get the differences and thought by lining them side by side it would be easier in an Access table. I would rather do this in Access to keep all the data in one place. My last post is what I hoped to wind up with in the end. I probably need to delete this posting and restart.
Sorry for the confusion
 

Watch MrExcel Video

Forum statistics

Threads
1,113,904
Messages
5,544,978
Members
410,647
Latest member
LegenDSlayeR
Top