How to match and align unsorted data and apply a unique identifier for sorting

BobMi

New Member
Joined
Feb 10, 2014
Messages
1
I'm trying to help organize a colleagues data in Excel 2010 on Windows 7 and have encountered 3 issues that could be very time-consuming to resolve manually. The data is from a multi-year study, only a few samples and months are shown.


The main issue: Sort & match in Excel, data from tables in Word with results in excel.

Step 1: Have imported the Word Table (using table to text, import, etc. - Thanks to the Forum) into Excel. I'm stuck at the next step on finding out how to automate the sort & matching.

The goal is being able to non-manually match the row with experimental results (Fig 2; column O) with the row with corresponding sample label on the data sheet (Fig 1, Column I). Goal is shown in Figure 3.

Fig1. Data sheet
ABIK
3LocationDateSample LabelPIT Tag #
4
5
615/12/20131FC5-13003-282-020
715/12/20131MC5-13010-012-602
815/12/20132MC5-13003-282-260 & 003-290-865
915/12/20133MC5-13075-063-375
1015/12/20134MC5-13003-302-263
1115/13/2013(3MC5-13)075-063-375
1212/15/20111m2-11 cp001-002-003
1312/15/20115m2-11 cp002-003-004
1412/15/20116m2-11 cp004-005-006
1512/15/20117m2-11007-008-009

<tbody>
</tbody>

Fig 2. Experimental Results

OPX
3Sample LabelCollection DateT Average
4(ng / dl)
5
61m2-11 cp2/15/20114.68
73MC5-135/12/201314.115
85m2-11 cp2/15/20116.67
96m2-11 cp2/15/201123.42
107m2-112/15/201139.77

<tbody>
</tbody>

Goal - align, sort and match rows by sample label (match column I with column O).

Fig 3. Properly aligned and matched.
ABIKOPX
3LocationDateSample LabelPIT Tag #Sample LabelCollection DateT Average
4(ng / dl)
5
615/12/20131FC5-13003-282-020
715/12/20131MC5-13010-012-602
815/12/20132MC5-13003-282-260 & 003-290-865
915/12/20133MC5-13075-063-3753MC5-135/12/201314.115
1015/12/20134MC5-13003-302-263
1115/13/2013(3MC5-13)075-063-375
1212/15/20111m2-11 cp001-002-0031m2-11 cp2/15/20114.68
1312/15/20115m2-11 cp002-003-0045m2-11 cp2/15/20116.67
1412/15/20116m2-11 cp004-005-0066m2-11 cp2/15/201123.42
1512/15/20117m2-11007-008-0097m2-112/15/201139.77

<tbody>
</tbody>


Second issue:

In Fig 3 above for Column K, there should be only one 9 digit number. However some PIT Tags # were mistakenly applied two or three times. What I would like to for the cells with multiple #'s is assign a unique 9-digit ID (single # ) like below.

Part 2. Fig 1.
16SamplePIT Tag #Unique ID
171010-012-602010-012-602
182003-282-260 & 003-290-865001-002-003

<tbody>
</tbody>

The second part of this issue is that should the PIT Tag# (correct or mistaken) be encountered later; then correctly apply the Unique ID.


Example:
If the PIT Tag# encountered on row 200 is 003-282-260 ---> use Unique ID 001-002-003
... PIT Tag# on row 3000 is 003-290-865 ---> use Unique ID 001-002-003
However, should PIT Tag# 010-012-602 be encountered later ----> use Unique ID 010-012-602

ALM
16PIT Tag #Unique ID
171010-012-602010-012-602
182003-282-260 & 003-290-865001-002-003
193003-282-260001-002-003
204 003-290-865001-002-003
21next year010-012-602010-012-602

<tbody>
</tbody>



Third Issue:
Another colleague has their data in excel in a row/column format on around 100 or more worksheets that need to be integrated with the above data : The a and b below refer to repetitions.

Issue 3. Fig 1.
ABCDEFGHIJKLMNOPQRS
36FemaleMale
37IDHormone AppmavgHormone BppmavgIDHormone AppmavgHormone Bppmavg
3811F6-11 a0.66613.2810.6517.763492.43487.026M6-11 a0.2992.983.546.719186.26203.06
3911F6-11 b0.4028.0117.373481.616M6-11 b0.4124.117.931219.86

<tbody>
</tbody>

In order to apply the solutions to the first two issues, I would like to find a non-manual way to transform the reps from a row/column format in Issue 3 Fig1. to a row-only format below (column C is rep A and column D is rep B for Hormone A).


BCDEFGHIJKL
42IDHormone AppmavgHormone Bppmavg
4311F6-110.6660.40213.288.0110.6517.76317.373492.43481.61487.02
446M6-110.2990.4124.117.9313.546.7197.93186.26219.86203.06

<tbody>
</tbody>

Thanks in advance for any help,

Bob
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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