seattletimebandit
Board Regular
- Joined
- Apr 11, 2013
- Messages
- 69
Curious to know if there is a way to take data from one table and reorder the data into into another table. My project is creating tables of soil sample data collected for environmental cleanup.
First table is output from another VBA routine.
[TABLE="class: grid, width: 801"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]GP-1-1.8[/TD]
[TD="align: center"]GP-1-5.5[/TD]
[TD="align: center"]GP-1-18.25
[/TD]
[TD="align: center"]GP-1-21
[/TD]
[TD="align: center"]GP-1-26[/TD]
[TD="align: center"]GP-1-34[/TD]
[TD="align: center"]GP-1-40[/TD]
[/TR]
[TR]
[TD]Benzene[/TD]
[TD="align: center"]0.00844 U[/TD]
[TD="align: center"]0.0074 U[/TD]
[TD="align: center"]0.00749 U[/TD]
[TD="align: center"]0.0128 U[/TD]
[TD="align: center"]0.00885 U[/TD]
[TD="align: center"]0.00889 U[/TD]
[TD="align: center"]0.00901 U[/TD]
[/TR]
[TR]
[TD]Toluene[/TD]
[TD="align: center"]0.0242 U[/TD]
[TD="align: center"]0.0212 U[/TD]
[TD="align: center"]0.0214 U[/TD]
[TD="align: center"]0.0205 U[/TD]
[TD="align: center"]0.0253 U[/TD]
[TD="align: center"]0.0254 U[/TD]
[TD="align: center"]0.0258 U[/TD]
[/TR]
[TR]
[TD]Ethylbenzene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]mp-Xylene[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]o-Xylene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]Gasoline[/TD]
[TD="align: center"]61.04[/TD]
[TD="align: center"]500[/TD]
[TD="align: center"]1000[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD]PCE[/TD]
[TD="align: center"]6.04[/TD]
[TD="align: center"]5.29[/TD]
[TD="align: center"]5.36[/TD]
[TD="align: center"]5.13[/TD]
[TD="align: center"]6.33[/TD]
[TD="align: center"]6.36[/TD]
[TD="align: center"]6.44[/TD]
[/TR]
</tbody>[/TABLE]
I need to split the depths from the Sample ID. So it's copying the Sample ID and pasting to the first row/col, splitting off the depths into the following columns, or deleting the Sample ID from those columns, leaving only the depth (also removing the second dash "-")).
The output table looks like this:
[TABLE="class: grid, width: 801, align: left"]
<tbody>[TR]
[TD="align: center"]GP-1
[/TD]
[TD="align: center"]1.8
[/TD]
[TD="align: center"]5.5[/TD]
[TD="align: center"]18.25[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]26[/TD]
[TD="align: center"]34[/TD]
[TD="align: center"]40[/TD]
[/TR]
[TR]
[TD]Benzene[/TD]
[TD="align: center"]0.00844 U[/TD]
[TD="align: center"]0.0074 U[/TD]
[TD="align: center"]0.00749 U[/TD]
[TD="align: center"]0.0128 J[/TD]
[TD="align: center"]0.00885 U[/TD]
[TD="align: center"]0.00889 U[/TD]
[TD="align: center"]0.00901 U[/TD]
[/TR]
[TR]
[TD]Toluene[/TD]
[TD="align: center"]0.0242 U[/TD]
[TD="align: center"]0.0212 U[/TD]
[TD="align: center"]0.0214 U[/TD]
[TD="align: center"]0.0205 U[/TD]
[TD="align: center"]0.0253 U[/TD]
[TD="align: center"]0.0254 U[/TD]
[TD="align: center"]0.0258 U[/TD]
[/TR]
[TR]
[TD]Ethylbenzene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]mp-Xylene[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636 U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]o-Xylene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]Gasoline[/TD]
[TD="align: center"]61.04[/TD]
[TD="align: center"]500[/TD]
[TD="align: center"]1000[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD]Diesel[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636 U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]PCE[/TD]
[TD="align: center"]6.04[/TD]
[TD="align: center"]5.29[/TD]
[TD="align: center"]5.36[/TD]
[TD="align: center"]5.13[/TD]
[TD="align: center"]6.33[/TD]
[TD="align: center"]6.36[/TD]
[TD="align: center"]6.44[/TD]
[/TR]
</tbody>[/TABLE]
Is this even possible?
Thanks in advance!
stb
First table is output from another VBA routine.
- NOTE: the "GP-1" is the location of a soil sample collected; the trailing numbers are the depth the sample was collected ("1.8" feet, "5.5" feet, etc.)
[TABLE="class: grid, width: 801"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]GP-1-1.8[/TD]
[TD="align: center"]GP-1-5.5[/TD]
[TD="align: center"]GP-1-18.25
[/TD]
[TD="align: center"]GP-1-21
[/TD]
[TD="align: center"]GP-1-26[/TD]
[TD="align: center"]GP-1-34[/TD]
[TD="align: center"]GP-1-40[/TD]
[/TR]
[TR]
[TD]Benzene[/TD]
[TD="align: center"]0.00844 U[/TD]
[TD="align: center"]0.0074 U[/TD]
[TD="align: center"]0.00749 U[/TD]
[TD="align: center"]0.0128 U[/TD]
[TD="align: center"]0.00885 U[/TD]
[TD="align: center"]0.00889 U[/TD]
[TD="align: center"]0.00901 U[/TD]
[/TR]
[TR]
[TD]Toluene[/TD]
[TD="align: center"]0.0242 U[/TD]
[TD="align: center"]0.0212 U[/TD]
[TD="align: center"]0.0214 U[/TD]
[TD="align: center"]0.0205 U[/TD]
[TD="align: center"]0.0253 U[/TD]
[TD="align: center"]0.0254 U[/TD]
[TD="align: center"]0.0258 U[/TD]
[/TR]
[TR]
[TD]Ethylbenzene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]mp-Xylene[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]o-Xylene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]Gasoline[/TD]
[TD="align: center"]61.04[/TD]
[TD="align: center"]500[/TD]
[TD="align: center"]1000[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD]PCE[/TD]
[TD="align: center"]6.04[/TD]
[TD="align: center"]5.29[/TD]
[TD="align: center"]5.36[/TD]
[TD="align: center"]5.13[/TD]
[TD="align: center"]6.33[/TD]
[TD="align: center"]6.36[/TD]
[TD="align: center"]6.44[/TD]
[/TR]
</tbody>[/TABLE]
I need to split the depths from the Sample ID. So it's copying the Sample ID and pasting to the first row/col, splitting off the depths into the following columns, or deleting the Sample ID from those columns, leaving only the depth (also removing the second dash "-")).
The output table looks like this:
[TABLE="class: grid, width: 801, align: left"]
<tbody>[TR]
[TD="align: center"]GP-1
[/TD]
[TD="align: center"]1.8
[/TD]
[TD="align: center"]5.5[/TD]
[TD="align: center"]18.25[/TD]
[TD="align: center"]21[/TD]
[TD="align: center"]26[/TD]
[TD="align: center"]34[/TD]
[TD="align: center"]40[/TD]
[/TR]
[TR]
[TD]Benzene[/TD]
[TD="align: center"]0.00844 U[/TD]
[TD="align: center"]0.0074 U[/TD]
[TD="align: center"]0.00749 U[/TD]
[TD="align: center"]0.0128 J[/TD]
[TD="align: center"]0.00885 U[/TD]
[TD="align: center"]0.00889 U[/TD]
[TD="align: center"]0.00901 U[/TD]
[/TR]
[TR]
[TD]Toluene[/TD]
[TD="align: center"]0.0242 U[/TD]
[TD="align: center"]0.0212 U[/TD]
[TD="align: center"]0.0214 U[/TD]
[TD="align: center"]0.0205 U[/TD]
[TD="align: center"]0.0253 U[/TD]
[TD="align: center"]0.0254 U[/TD]
[TD="align: center"]0.0258 U[/TD]
[/TR]
[TR]
[TD]Ethylbenzene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]mp-Xylene[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636 U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]o-Xylene[/TD]
[TD="align: center"]0.0302 U[/TD]
[TD="align: center"]0.0265 U[/TD]
[TD="align: center"]0.0268 U[/TD]
[TD="align: center"]0.0256 U[/TD]
[TD="align: center"]0.0317 U[/TD]
[TD="align: center"]0.0318 U[/TD]
[TD="align: center"]0.0322 U[/TD]
[/TR]
[TR]
[TD]Gasoline[/TD]
[TD="align: center"]61.04[/TD]
[TD="align: center"]500[/TD]
[TD="align: center"]1000[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]15[/TD]
[/TR]
[TR]
[TD]Diesel[/TD]
[TD="align: center"]0.0604 U[/TD]
[TD="align: center"]0.0529 U[/TD]
[TD="align: center"]0.0536 U[/TD]
[TD="align: center"]0.0513 U[/TD]
[TD="align: center"]0.0633 U[/TD]
[TD="align: center"]0.0636 U[/TD]
[TD="align: center"]0.0644 U[/TD]
[/TR]
[TR]
[TD]PCE[/TD]
[TD="align: center"]6.04[/TD]
[TD="align: center"]5.29[/TD]
[TD="align: center"]5.36[/TD]
[TD="align: center"]5.13[/TD]
[TD="align: center"]6.33[/TD]
[TD="align: center"]6.36[/TD]
[TD="align: center"]6.44[/TD]
[/TR]
</tbody>[/TABLE]
Is this even possible?
Thanks in advance!
stb