Consolidation of many sheets with VBA?

kin

Well-known Member
Joined
Jun 26, 2007
Messages
648
Hello,

I d like to ask you how I can consolidate many sheets I have from the previous weeks. The names of files are called plais1, plais2,plais49.... referring to the number of week. The format of excel file is as follows.

HEAD CUTXTPLAISIO STOCKSALESTXT1 16
CUST 272500650 COMPUTERS
DATE 14/1/2008 7/1/2008 13/1/2008
SUPP 4039022000008 AT
LINE 1 272500650 4901780959501 MS 0 0
LINE 2 272500650 711719606581 PS 0 1
LINE 3 272500650 711719102304 PS 0 0
LINE 4 272500650 711719638841 PS 1 1
LINE 5 272500650 711719102205 PS 0 1
LINE 6 272500650 4905524456196 MS 0 0
LINE 7 272500650 4905524453188 VG 0 0
LINE 8 272500650 711719689287 CE 1 1
LINE 9 272500650 4905524411447 DS 1 0
LINE 10 272500650 4905524441628 MS 1 0
LINE 11 272500650 711719467656 PS 0 1
LINE 12 272500650 4905524333688 MS 0 1
LINE 13 272500650 4905524455823 VG 0 0
LINE 14 272500650 4905524397826 DV 1 1
LINE 15 272500650 520600800022 PS 0 0
LINE 16 272500650 4905524414509 NW 1 1
LINE 17 272500650 4905524397819 DV 1 1
LINE 18 272500650 4905524434156 RD 0 0
LINE 19 272500650 4905524452884 VG 0 0
LINE 20 272500650 711719430759 PS 0 1
LINE 21 272500650 5013493077270 PS 0 0
LINE 22 272500650 520600800021 PS 0 0
LINE 23 272500650 4905524449747 KD 1 1
LINE 24 272500650 4905524397840 DV 1 1
LINE 25 272500650 4905524420685 RD 0 0
LINE 26 272500650 4905524459814 KD 0 0
LINE 27 272500650 4902370515657 0 0
LINE 28 272500650 711719484950 PS 0 0
LINE 29 272500650 711719636168 PS 1 0
LINE 30 272500650 5013493087606 DS 1 1
LINE 31 272500650 711719435556 PS 0 0
LINE 32 272500650 4905524419269 KD 0 1
LINE 33 272500650 711719660576 PS 1 1
LINE 34 272500650 4905524456219 MS 1 1
LINE 35 272500650 4905524420661 RD 1 0
LINE 36 272500650 4901780942947 MS 1 0
LINE 37 272500650 711719444350 PS 0 0
LINE 38 272500650 4905524433302 KD 1 0
LINE 39 272500650 4905524442908 NW 0 1
LINE 40 272500650 4905524414516 NW 1 1
LINE 41 272500650 4905524394887 DA 1 0
LINE 42 272500650 711719424659 PS 0 1
LINE 43 272500650 4905524394054 VP 0 0
LINE 44 272500650 5013493089280 PS 0 1
LINE 45 272500650 4905524464634 DS 1 0
LINE 46 272500650 4905524456233 MS 0 0
LINE 47 272500650 4905524394832 DA 0 1
LINE 48 272500650 4905524460568 DV 0 0
LINE 49 272500650 4905524442847 NW 0 1
LINE 50 272500650 4905524442861 NW 0 0
LINE 51 272500650 4905524442922 NW 1 0
LINE 52 272500650 4905524464900 DS 1 0
LINE 53 272500650 5013493086579 DC 0 0
LINE 54 272500650 4905524442373 NW 1 1
LINE 55 272500650 4905524378719 ST 0 1
LINE 56 272500650 4901780966370 LC 0 1
LINE 57 272500650 4905524409307 KD 1 1
LINE 58 272500650 5013493086593 DC 1 1
LINE 59 272500650 711719409427 PS 1 1
LINE 60 272500650 4905524411805 DS 1 1
LINE 61 272500650 4905524453386 VG 0 0
LINE 62 272500650 4905524390063 KD 1 0
LINE 63 272500650 4905524466669 KD 0 1
LINE 64 272500650 4905524366822 DC 1 1
LINE 65 272500650 4905524449488 KD 0 1
LINE 66 272500650 4905524419184 KD 0 0
LINE 67 272500650 4905524422061 DV 1 0
LINE 68 272500650 711719626497 PS 0 0
LINE 69 272500650 4905524462050 DS 1 1
LINE 70 272500650 4905524397857 DV 1 1
LINE 71 272500650 4905524429855 NW 0 0
LINE 72 272500650 4905524393712 CM 0 1
LINE 73 272500650 4905524442892 NW 1 0
LINE 74 272500650 4905524418828 KD 0 0
LINE 75 272500650 4905524333954 RD 0 1
LINE 76 272500650 711719691617 SC 0 0
LINE 77 272500650 5013493073197 CA 1 0
LINE 78 272500650 5013493086616 DC 1 1
LINE 79 272500650 4905524438093 HD 1 1
LINE 80 272500650 5013493087866 DS 0 0
LINE 81 272500650 4905524420692 RD 0 1
LINE 82 272500650 4905524394641 DA 0 1
LINE 83 272500650 4905524433708 BD 1 1
LINE 84 272500650 711719409953 PS 1 0
LINE 85 272500650 4905524466607 KD 1 0
LINE 86 272500650 711719689089 SW 1 0
LINE 87 272500650 711719657187 SW 0 0
LINE 88 272500650 4905524416930 DS 1 0
LINE 89 272500650 711719804208 0 1
LINE 90 272500650 4905524392531 LC 1 0
LINE 91 272500650 4905524408041 MS 1 0
LINE 92 272500650 4905524333695 MS 1 0
LINE 93 272500650 4905524418743 KD 1 1
LINE 94 272500650 711719687283 SW 1 1
LINE 95 272500650 4905524445718 VG 0 1
LINE 96 272500650 4905524416763 DS 1 1
LINE 97 272500650 4905524411713 DS 0 0
LINE 98 272500650 4905524371703 VP 0 0
TOTL 103


What changes from this file is the number of lines , the Totl and the codes starting from 49 or 71 and the descriptions beside them, also the dates in the beginning of sheet. The codes from 27.... remains the same.

The sheets I have so far are from plais1.......to plais52. Can I make them be consolidated in a workbook?

Thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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