Populate column with corresponding row values grouped by lab test (row to column)

newbieX

New Member
Joined
Jul 24, 2013
Messages
35
I have an Excel 2007 spreadsheet that contains lab results that I want to import into Access. I need to reformat the data so that all the toxicology results are on a single row based on their LabNumber with only one row per lab number.

My data looks like this:

Excel 2007
ABCDEFGHIJKLM
1SpeciesTypeMethodLabNumberCustNumberArsenicBariumCadmiumCalciumChromiumCobaltCopperIron
2GoatSerumICPV1001245MTGT Pink 6026.4
3GoatSerumICPV1001245MTGT Pink 600.44
4GoatSerumICPV1001245MTGT Pink 600.78
5GoatSerumICPV1001245MTGT Pink 6091.71.82
6GoatSerumICPV1001245MTGT Pink 6043.7
7GoatSerumICPV1001246MTGT Pink 6723.6
8GoatSerumICPV1001246MTGT Pink 671.24
9GoatSerumICPV1001246MTGT Pink 670.738
10GoatSerumICPV1001246MTGT Pink 6783.20.769
11GoatSerumICPV1001246MTGT Pink 6763.7
12GoatSerumICPV1001247MTGT Pink 7326.2
13GoatSerumICPV1001247MTGT Pink 730.738
14GoatSerumICPV1001247MTGT Pink 730.875
15GoatSerumICPV1001247MTGT Pink 7389.90.97
16GoatSerumICPV1001247MTGT Pink 7356.9
17GoatBlood - WholeICP-MSV1001257MTGT Pink 600.06443
18GoatBlood - WholeICP-MSV1001258MTGT Pink 670.06987
19GoatBlood - WholeICP-MSV1001259MTGT Pink730.1001

<tbody>
</tbody>
Sheet1
I want it to look like this:

Excel 2007
ABCDEFGHIJKLM
1SpeciesTypeMethodLabNumberCustNumberArsenicBariumCadmiumCalciumChromiumCobaltCopperIron
2GoatSerumICPV1001245MTGT Pink 6026.40.7891.743.70.441.82
3GoatSerumICPV1001246MTGT Pink 6723.60.73883.263.71.240.769
4GoatSerumICPV1001247MTGT Pink 7326.20.87556.989.90.7380.97
5GoatBlood - WholeICP-MSV1001257MTGT Pink 600.06443
6GoatBlood - WholeICP-MSV1001258MTGT Pink 670.06987
7GoatBlood - WholeICP-MSV1001259MTGT Pink730.1001

<tbody>
</tbody>
Sheet2

Does anyone have a solution as to how to accomplish this? We have several files in this format thus an automation process that can be used over and over again is preferred.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,945
Messages
6,127,851
Members
449,411
Latest member
adunn_23

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