Data arrangement macro

makinmomb

Active Member
Joined
Dec 23, 2013
Messages
401
I want to re arrange my data as follows , if i do manually it will take long
, cell reference A meaning on sheet 2

[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]D3[/TD]
[TD="class: xl63, width: 64"]TO[/TD]
[TD="class: xl63, width: 64"]A1[/TD]
[/TR]
[TR]
[TD="class: xl63"]E3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A2[/TD]
[/TR]
[TR]
[TD="class: xl63"]J3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A3[/TD]
[/TR]
[TR]
[TD="class: xl63"]O3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A4[/TD]
[/TR]
[TR]
[TD="class: xl63"]N3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A5[/TD]
[/TR]
[TR]
[TD="class: xl63"]F3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A6[/TD]
[/TR]
[TR]
[TD="class: xl63"]G3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A7[/TD]
[/TR]
[TR]
[TD="class: xl63"]I3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A8[/TD]
[/TR]
[TR]
[TD="class: xl63"]H3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A9[/TD]
[/TR]
[TR]
[TD="class: xl63"]B3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A10[/TD]
[/TR]
[TR]
[TD="class: xl63"]K3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A11[/TD]
[/TR]
[TR]
[TD="class: xl63"]M3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A12[/TD]
[/TR]
[TR]
[TD="class: xl66"]C3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A13[/TD]
[/TR]
[TR]
[TD="class: xl64"][/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD="class: xl66"]W3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A14[/TD]
[/TR]
[TR]
[TD="class: xl66"]U3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A15[/TD]
[/TR]
[TR]
[TD="class: xl66"]V3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A16[/TD]
[/TR]
[TR]
[TD="class: xl66"]S3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A17[/TD]
[/TR]
[TR]
[TD="class: xl66"]T3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A18[/TD]
[/TR]
[TR]
[TD="class: xl66"]X3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A19[/TD]
[/TR]
[TR]
[TD="class: xl66"]AA3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A20[/TD]
[/TR]
[TR]
[TD="class: xl63"]Y3[/TD]
[TD="class: xl63"]TO[/TD]
[TD="class: xl63"]A21[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
It will be file 3 , another excel file macro enabled , this file 3 will do the linkage , I will then open file 2 to see if it has pushed the needful data

I will write , AUTO on cell a1 on that macro to make sure the file is not completely blank
 
Last edited:
Upvote 0
file 1 raw data , excel file
file 2 data re arrange through macro , excel file
file 3 actual macro to arrange macro from file 1 to file 2 , excel macro enabled
 
Upvote 0
file 1 raw data , excel file
file 2 data re arrange through macro , excel file
file 3 actual macro to arrange macro from file 1 to file 2 , excel macro enabled
It will take me a little time to set this up and I have to squeeze do that in with other things in my personal life, so it may be a while before I can get back to you.

I do have some questions though...

1) Is the mapping you show in Message #17 complete (that is, there will be no other cells being mapped)?

2) What are the name of the sheet in File1 that contains the data ane what is the name of the sheet in File2 that receives the data?

3) Will these files be opened already or will the macro have to do that? If the macro has to open them, what is the path to File1 and File2?

4) Is File1 and File2 the actual names of the files? If not, what are the filenames?
 
Upvote 0
1 ) yes that is the map
2 ) sheet1 and sheet1 for both files
3 ) These files will keep open both so that file 3 does the necessary pull
4 ) Yes those are the actual names , they are placed under folder c:\rickmagic
 
Upvote 0
If there is no need of the third file , I can run the macro from file 2 which i will save as as macro enabled
 
Upvote 0
The mapping has changed to as follows

[TABLE="width: 128"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD]D1[/TD]
[TD]B4[/TD]
[/TR]
[TR]
[TD]E1[/TD]
[TD]B5[/TD]
[/TR]
[TR]
[TD]F1[/TD]
[TD]B6[/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B7[/TD]
[/TR]
[TR]
[TD]K1[/TD]
[TD]B8[/TD]
[/TR]
[TR]
[TD]P1[/TD]
[TD]B9[/TD]
[/TR]
[TR]
[TD]N1[/TD]
[TD]B10[/TD]
[/TR]
[TR]
[TD]G1[/TD]
[TD]B11[/TD]
[/TR]
[TR]
[TD]H1[/TD]
[TD]B12[/TD]
[/TR]
[TR]
[TD]J1[/TD]
[TD]B13[/TD]
[/TR]
[TR]
[TD]I1[/TD]
[TD]B14[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]B15[/TD]
[/TR]
[TR]
[TD]L1[/TD]
[TD]B16[/TD]
[/TR]
[TR]
[TD]M1[/TD]
[TD]B17[/TD]
[/TR]
[TR]
[TD]C1[/TD]
[TD]B18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]U1[/TD]
[TD]C20[/TD]
[/TR]
[TR]
[TD]V1[/TD]
[TD]C21[/TD]
[/TR]
[TR]
[TD]W1[/TD]
[TD]C22[/TD]
[/TR]
[TR]
[TD]X1[/TD]
[TD]C23[/TD]
[/TR]
[TR]
[TD]Y1[/TD]
[TD]C24[/TD]
[/TR]
[TR]
[TD]S1[/TD]
[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]
[TR]
[TD]AZ1[/TD]
[TD]B55[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,198
Members
453,022
Latest member
RobertV1609

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