Jumbled data into one column

brandon20

Board Regular
Joined
Feb 12, 2014
Messages
203
Hi,

I have a bunch of data that is poorly sorted in different columns. (Ie. Depth is in column A, B, C and so on)
I am attempting to put all the data into specified columns (Ie. Depth in only Column A)

I have put all the data into one worksheet and also concatenated the column name to the data. (Ie. all the data says 7453DEPTH, 8000DEPTH, and so on)

With the column name concatenated to the data itself I thought it would be easy to put all the jumbled data from a table array (A1:T24961) into lets say, column U.

If the data was not there then it would just say #N/A and if it was it would fill column U with 7453DEPTH and so forth.


Is there a way to do this? or a simpler method?

Any help is appreciated.

Thank you,
Brandon
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Will the DEPTH cell show up more than once on a row? It should be a pretty simple find/replace macro where it looks in [ROW1] for a header name, searches all the data for the header word, and populates the column. Then it moves on to the next column header and does it again.
 
Upvote 0
Yes, the DEPTH cell will show up more than once, (as seen at the bottom.)
(I of course could get rid of all the cells that say only "DEPTH". But it sounds like they may be needed for the macro.
Just to make sure I explained my self correctly. Depth is in column A but as you keep going down it may change to something else (like DATE), which is why I need the macro.





THANKS!


[TABLE="width: 444"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]DEPTH[/TD]
[TD]FPRESSURE[/TD]
[TD]HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8845DEPTH[/TD]
[TD]-999.25FPRESSURE[/TD]
[TD]-999.25HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8845DEPTH[/TD]
[TD]2801FPRESSURE[/TD]
[TD]5229.9102HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8878DEPTH[/TD]
[TD]2710FPRESSURE[/TD]
[TD]5241.3301HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8907DEPTH[/TD]
[TD]3007FPRESSURE[/TD]
[TD]5235.6201HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8940DEPTH[/TD]
[TD]3389.3999FPRESSURE[/TD]
[TD]5241.3301HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8982DEPTH[/TD]
[TD]3393.3999FPRESSURE[/TD]
[TD]4241.3301HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8992DEPTH[/TD]
[TD]3436FPRESSURE[/TD]
[TD]5247.0498HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9022DEPTH[/TD]
[TD]3215FPRESSURE[/TD]
[TD]5247.0498HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9037DEPTH[/TD]
[TD]3251.8FPRESSURE[/TD]
[TD]5247.0498HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9062DEPTH[/TD]
[TD]3247.8FPRESSURE[/TD]
[TD]5298.7998HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9062DEPTH[/TD]
[TD]-999.25FPRESSURE[/TD]
[TD]5304.5898HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9062DEPTH[/TD]
[TD]3247.9299FPRESSURE[/TD]
[TD]5304.5898HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9087DEPTH[/TD]
[TD]3247.27FPRESSURE[/TD]
[TD]5304.5898HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9087DEPTH[/TD]
[TD]3251FPRESSURE[/TD]
[TD]5293.0298HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9097DEPTH[/TD]
[TD]3253.8FPRESSURE[/TD]
[TD]5287.2598HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9110DEPTH[/TD]
[TD]3254FPRESSURE[/TD]
[TD]5281.5HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9234DEPTH[/TD]
[TD]3685.3301FPRESSURE[/TD]
[TD]5310.3799HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9257DEPTH[/TD]
[TD]3723FPRESSURE[/TD]
[TD]5316HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9300DEPTH[/TD]
[TD]3766.27FPRESSURE[/TD]
[TD]5316.1699HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]9370DEPTH[/TD]
[TD]3770.27FPRESSURE[/TD]
[TD]5362HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]DEPTH[/TD]
[TD]FPRESSURE[/TD]
[TD]HYDRO_AFTER[/TD]
[/TR]
[TR]
[TD]8124DEPTH[/TD]
[TD]1531.2FPRESSURE[/TD]
[TD]4941.5698HYDRO_AFTER[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
So what would a macro that could go through all the info from A1:T25075 and Find/Replace that data into columns look like?

Im not very good at writing VBA.
 
Upvote 0

Forum statistics

Threads
1,222,180
Messages
6,164,419
Members
451,894
Latest member
480BOY

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