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

D3TOA1
E3TOA2
J3TOA3
O3TOA4
N3TOA5
F3TOA6
G3TOA7
I3TOA8
H3TOA9
B3TOA10
K3TOA11
M3TOA12
C3TOA13
W3TOA14
U3TOA15
V3TOA16
S3TOA17
T3TOA18
X3TOA19
AA3TOA20
Y3TOA21

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I need the following shifting automated

D1B4
E1B5
F1B6
A1B7
K1B8
P1B9
N1B10
G1B11
H1B12
J1B13
I1B14
B1B15
L1B16
M1B17
C1B18
V1C20
T1C21
T2C22
R1C23
S1C24
Y1C25
W1C26
Z1C27
X1C28
AA1C31
AC1B32
AB1C33
AE1B34
AF1B35
AG1B36
AO1C37
AL1C38
AM1C39
AN1C40
AD1B41
AQ1B43
AR1B44
AS1B45
AT1B46
AU1B47
AV1B50
AW1B51

<colgroup><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
I need a macro on a blank file to do the following

Read file name file1 to shift data to file2 , both files on drive c in folder created Rick Magic ,
it should paste data in the format file2 is
 
Upvote 0
NOJOB NOCLEARPREOBLINVCLIENTCONTAINERWCDESTINATIONTRUCKTRAILDRIVERCOMPANYDATEXTYRE FTYRE BT Q1T Q2SPARESF1F2F1QF2QPOSHOPOSHOPOSHOPARKVISR TBONRTCOMCTINSCC1CC2CC3levyotherwharportdelivydemuother$ SALE$ SALE$ TOT$ PROF%
1TR-0722-18TR#####################MAISON GALAXY TCNU14086464.940LUBUMBASHI T674BUXT924DEQ SAID YUSSUF KITENGE AQUARIUS#######X0000911000319500011850001500500480000250000$50 $30 $100 $356 $90 214000 10000420001500026000 $180 $117 $39 $6,600 ##############43%

<colgroup><col width="64" span="52" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
PRE7-Jul
OBL10-Jul
INV7-Jul
TRIP NO1
LOCATIONKASUMBALESA
DATE - TRUCK LOADING 1-Sep
DRIVER NAMEMARIDADI ABUTWALIBU LUKWARO
CONSIGNEE & DESTINATION TESCO LTD
CONT NOMSKU9984592
CONT SIZE40
WEIGHT21.9
REFTR-0664-18
TRUCK NOT444CZS
TRAILER NOT172DAR
LOADED UNDER SIM
WORKSHOP SPARES186 424,000
TYRES QTY FRONTX 2
TYRES QTY BACKX 2
TYRES FRONT VALUE535 1,220,000
TYRES BACK VALUE 246 560,000
FUEL FROM INARA QTYX1600
FUEL FROM INARA VALUE1495 3,408,000
FUEL FROM TUNDUMA QTY AND VALUEX 500
FUEL FROM TUNDUMA VALUE520 1,185,000
TOTAL FUEL TAKENX 2,100
POSHO 1 DAR - GOING211 480,000
POSHO 2 AT LOCATION50 X
POSHO 3 RETURN110 250,000
VISA0 X
ROAD TOLL356 X
BOND90 X
LEVY11 26,000
CITY COUNCIL - 14 10,000
CITY COUNCIL - 218 42,000
CITY COUNCIL - 37 15,000
PARKING FLAT EVERY TRIP30 X
WHARFAGE180 X
PORT117 X
DELIVERY39 X
DEMU0 X
OTHER0 X
TOTAL EXPENSES4,129USD
SALES5,600USD
SALES COPPER USD
PROFIT1,471USD
MARGIN26% 2,280

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
File 1 details into File 2 , i have mentioned what needs to be where , d1 from file 1 to B4 onto cell b4 , while pasting data to retain formats of file 2

D1B4
E1B5
F1B6
A1B7
K1B8
P1B9
N1B10
G1B11
H1B12
J1B13
I1B14
B1B15
L1B16
M1B17
C1B18
V1C20
T1C21
T2C22
R1C23
S1C24
Y1C25
W1C26
Z1C27
X1C28
AA1C31
AC1B32
AB1C33
AE1B34
AF1B35
AG1B36
AO1C37
AL1C38
AM1C39
AN1C40
AD1B41
AQ1B43
AR1B44
AS1B45
AT1B46
AU1B47
AV1B50
AW1B51

<colgroup><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
:confused: You seem to be posting a lot of data without any explanation and, as best i can tell, without any question related to them.
 
Upvote 0
Rick if you can understand this , let me explain this again

I have two files

FILE 1
FILE 2

FILE 1 has details to go into FILE 2

FILE 1 data is vertical , FILE 2 is horizontal , i have quoted the cell shift from where to where

Example d1 from file 1 to go b4 of file 2
 
Last edited:
Upvote 0
I have two files

FILE 1
FILE 2

FILE 1 has details to go into FILE 2

FILE 1 data is vertical , FILE 2 is horizontal , i have quoted the cell shift from where to where

Example d1 from file 1 to go b4 of file 2

Are these files two different worksheets in the same workbook? Or are they two different workbooks? If two different workbooks, what sheets are the files on?
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,305
Members
449,150
Latest member
NyDarR

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