Hey guys...
Need a macro to copy the selected data from column A to other column's(B to N) once the pattern matches
This is my data in column 'A' starting from row-1
000XX WWWWWW 03052555AB
010XX ABCD QI 00000002+0000000008640112827.08QQQQ_MNO
02003052010SIP 000000000000120+0000000002197663524.08AXX ABCD QI
03001996 1003319 0143209 0000000 00000 +0000000000000000000.01
03001996 1803229 0176000 0000000 00000 +0000000000000000000.01
03001996 9803432 0103567 0000000 00000 +0000000000010000000.00
03001996 1603212 1000000 0000000 00000 +0000000000010000000.00
03001996 1603453 0903789 0000000 00000 -0000000000000009189.38
if there are n rows and first 3 rows in column 'A' are header.....hence the no of rows in o/p columns (B to N) will be 'n-2'
Need o/p in different column's as per below rule starting from row #2.....
COLUMN B ===> start="4" length="5" where Record Type = 000
COLUMN C ===> start="20" length="8" format="MMddyyyy" where Record Type = 000
COLUMN D ===> start="28" length="3" where Record Type = 000
COLUMN E ===> start="4" length="25" where Record Type = 010
COLUMN F ===> start="60" length="20" where Record Type = 010
COLUMN G ===> start="12" length="15" where Record Type = 020
COLUMN H ===> start="65" length="1" where Record Type = 020
COLUMN I ===> start="66" length="25" where Record Type = 020
COLUMN J ===> start="4" length="30" where Record Type = 030
COLUMN K ===> start="34" length="30" where Record Type = 030
COLUMN L ===> start="64" length="30" where Record Type = 030
COLUMN M ===> start="94" length="30" where Record Type = 030
COLUMN N ===> start="154" length="23" where Record Type = 030
need o/p as below
B C D E F G H I J K
XX 03052555 AB XX ABCD QI QQQQ_MNO SIP A XX ABCD QI 1996 1003319
XX 03052555 AB XX ABCD QI QQQQ_MNO SIP A XX ABCD QI 1996 1803229
XX 03052555 AB XX ABCD QI QQQQ_MNO SIP A XX ABCD QI 1996 9803432
XX 03052555 AB XX ABCD QI QQQQ_MNO SIP A XX ABCD QI 1996 1603212
XX 03052555 AB XX ABCD QI QQQQ_MNO SIP A XX ABCD QI 1996 1603453
L M N
143209 0000000 +0000000000000000000.01
176000 0000000 +0000000000000000000.01
103567 0000000 +0000000000010000000.00
1000000 0000000 +0000000000010000000.00
903789 0000000 -0000000000000009189.38
i have come up with the if clause as below....
=IF(LEFT($A$1,3)="000",MID($A$1,4,5),0)
but need a macro for it.....Can anyone help ??
Bookmarks