Not_Excel_lent
New Member
- Joined
- Oct 2, 2016
- Messages
- 8
Hello and thanks for the help in advance. I have been googling and trying to overcome this issue for days and cannot seem to get Index, Match or Lookup formula's to work. I have the following 2 Worksheets in a single Workbook (raw file gets converted and VBA code copies the second sheet in - probably irrelevant but thought I should mention).
The below is a table is a worksheet called 'Device List' with all Devices, UID's (unique Identifiers), Deployment Periods and Specific Deployment Locations.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]Device[/TD]
[TD]UID[/TD]
[TD]Deploy[/TD]
[TD]Retreive[/TD]
[TD]Site[/TD]
[TD]Grid[/TD]
[TD]Alt[/TD]
[TD]Var[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]17/04/2018[/TD]
[TD]17/04/2018[/TD]
[TD]Bris1[/TD]
[TD]77R[/TD]
[TD]B1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]18/04/2018[/TD]
[TD]25/06/2018[/TD]
[TD]Testing[/TD]
[TD]Nil[/TD]
[TD]Nil[/TD]
[TD]Nil[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]26/06/2018[/TD]
[TD]01/01/2019[/TD]
[TD]Bris2[/TD]
[TD]84P[/TD]
[TD]B2[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AB[/TD]
[TD]17/04/2018[/TD]
[TD]01/01/2019[/TD]
[TD]Bris1[/TD]
[TD]77R[/TD]
[TD]B1[/TD]
[TD]N[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 597"]
<tbody>[TR]
[TD]
The following has reading information including Date, Time, Device, Type of reading and the Value. It needs the Location information.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Device[/TD]
[TD]Site[/TD]
[TD]Grid[/TD]
[TD]Alt[/TD]
[TD]Var[/TD]
[TD]Type[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]18/05/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]18/05/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO2[/TD]
[TD]34.56[/TD]
[/TR]
[TR]
[TD]18/07/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO[/TD]
[TD]15.59[/TD]
[/TR]
[TR]
[TD]18/07/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Co2[/TD]
[TD]194[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
This is a snapshot of the data set however I am trying to get D,E,F,G above to fill with for Device 1AA on 18/05/2018 'Testing', 'Nil', "Nil', 'Nil' and 1AB on 18/07/2018 to be 'Bris1', '77R', 'B1', 'N'.
The issue I seem to be hitting is I cannot work out to have the Date in A find its home between the Dates in C & D then ensure the Device in C matches the UID in B with the final result in D to always be whatever matches in E.
Whatever solution works will be converted into a Macro which will run across the files hourly to ensure no humans are required for the data conversion process from raw file to polished file ready for upload into my analytics tool. The solution seems so simple but I am stuffed if I can get it to work right every time.
Appreciate the help and if you need more info or more data let me know.
Cheers!
The below is a table is a worksheet called 'Device List' with all Devices, UID's (unique Identifiers), Deployment Periods and Specific Deployment Locations.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]Device[/TD]
[TD]UID[/TD]
[TD]Deploy[/TD]
[TD]Retreive[/TD]
[TD]Site[/TD]
[TD]Grid[/TD]
[TD]Alt[/TD]
[TD]Var[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]17/04/2018[/TD]
[TD]17/04/2018[/TD]
[TD]Bris1[/TD]
[TD]77R[/TD]
[TD]B1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]18/04/2018[/TD]
[TD]25/06/2018[/TD]
[TD]Testing[/TD]
[TD]Nil[/TD]
[TD]Nil[/TD]
[TD]Nil[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AA[/TD]
[TD]26/06/2018[/TD]
[TD]01/01/2019[/TD]
[TD]Bris2[/TD]
[TD]84P[/TD]
[TD]B2[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]X R1[/TD]
[TD]1AB[/TD]
[TD]17/04/2018[/TD]
[TD]01/01/2019[/TD]
[TD]Bris1[/TD]
[TD]77R[/TD]
[TD]B1[/TD]
[TD]N[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 597"]
<tbody>[TR]
[TD]
The following has reading information including Date, Time, Device, Type of reading and the Value. It needs the Location information.
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Device[/TD]
[TD]Site[/TD]
[TD]Grid[/TD]
[TD]Alt[/TD]
[TD]Var[/TD]
[TD]Type[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]18/05/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]18/05/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AA[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO2[/TD]
[TD]34.56[/TD]
[/TR]
[TR]
[TD]18/07/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CO[/TD]
[TD]15.59[/TD]
[/TR]
[TR]
[TD]18/07/2018[/TD]
[TD]12:06:43 PM[/TD]
[TD]1AB[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Co2[/TD]
[TD]194[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
This is a snapshot of the data set however I am trying to get D,E,F,G above to fill with for Device 1AA on 18/05/2018 'Testing', 'Nil', "Nil', 'Nil' and 1AB on 18/07/2018 to be 'Bris1', '77R', 'B1', 'N'.
The issue I seem to be hitting is I cannot work out to have the Date in A find its home between the Dates in C & D then ensure the Device in C matches the UID in B with the final result in D to always be whatever matches in E.
Whatever solution works will be converted into a Macro which will run across the files hourly to ensure no humans are required for the data conversion process from raw file to polished file ready for upload into my analytics tool. The solution seems so simple but I am stuffed if I can get it to work right every time.
Appreciate the help and if you need more info or more data let me know.
Cheers!