Excel masterfile vba

moshc

New Member
Joined
Oct 24, 2019
Messages
6
Good day!

Anyone can help me please?

I've been looking for an EXCEL VBA code in which i will have the option to select a folder path first which all the workbooks i need to combined is saved and have all the first sheets in all workbook in that specific folder is then combined to a new workbook.

Would really much appreciate any immediate response.

Thank you!
 
When I tested the macro using a couple of dummy workbooks, it worked properly. The output is directed to Sheet1 of the workbook containing the macro. It is hard for me to see why it is not working for you because I don't have access to your actual files. Check to make sure that all the source workbooks have a sheet named ""EntryList".
Do you mind if I give you my screen on Teamviewer?
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I would prefer if you could upload your destination file and at least two or three of your source files to a free file sharing site and post the link here to the files (de-sensitized if necessary)
 
Upvote 0
When I tested the macro using a couple of dummy workbooks, it worked properly. The output is directed to Sheet1 of the workbook containing the macro. It is hard for me to see why it is not working for you because I don't have access to your actual files. Check to make sure that all the source workbooks have a sheet named ""EntryList".
Do you mind if I give you my screen on Teamviewer?
 
Upvote 0
@jskasango please do not offer to contact members privately in any way, as it is against the rules.
All communication must remain on the board.
Thanks
 
Upvote 0
@mumps I am plasing 3 XL2BB minisheets here for you to help me test the code. You can have one or two of them in a folder and the other/s in a subfolder.
In my computer, they sit at G:\CIMKEN\FBK\KB20B with a subfolder \TEST.
0B01.xls
ABCDKZABACADAEAGAHAIAJAKAL
1EntryStockIDNameBreedersPedigree1OriginnEarsSelectednVirusMaizeStreak1_5(1)nGrayLeafSpot1_5(1)nLeafBlightTurcicum1_5(1)nCommonRust1_5(1)nEarAspect1_5nGrainTexture1_5nAnthesisDatenHeteroticGroupnNumRows
2ENTSTKIDCODEPED1ORIESLMSV1GLS1ET1PS1EATEXAD
3NumberFormat00.00.00.00.00.00.00.0Text00.0
4NumObs
5Average
6
18
19
20
21
22
23EntryStockNamePedigreeOriginEarsMSVGLSE.turcP.sorgEarGrainAnthHetNumSilk
24IDSelectAspTexDateGroupRowsDate
251D1565-5dfadfgafafhahhfdfhafdh4
262D1565-7fdgadfhafdhadfhadfhafdh5
273D1565-8dfghadfhfdahafdhadfhhadfh7
284D1565-10dafaghadfhafhafdhafdadhf6
295D1565-10dafaghadfhafhafdhafdadhf6
306D1565-5dfadfgafafhahhfdfhafdh7.1
317D1565-7fdgadfhafdhadfhadfhafdh7.6
328D1565-8dfghadfhfdahafdhadfhhadfh8.1
Entrylist


0A50.xls
ABCDKZABACADAEAFAGAHAI
1EntryStockIDNameBreedersPedigree1OriginnEarsSelectednVirusMaizeStreak1_5(1)nGrayLeafSpot1_5(1)nLeafBlightTurcicum1_5(1)nCommonRust1_5(1)nPhaesLeafSpot1_5(1)nEarAspect1_5nGrainTexture1_5nAnthesisDate
18
19
20
21
22
23EntryStockNamePedigreeOriginEarsMSVGLSE.turcP.sorgPhaeoEarGrainAnth
24IDSelectAspTexDate
251D1449-53weqgtqeretqertqertgdgagagf10
262D1179-99ertqerttertertqertgsd4
273D1293-85erterttertertqertdsgga9
284D1179-101ertretteertertqergadg1
295D1411-12ertertdfgdfgddgdfgd2
30
Entrylist



0B02.xls
ABCDKZABACADAEAGAHAIAJAKALAMANAOAPAQ
1EntryStockIDNameBreedersPedigree1OriginnEarsSelectednVirusMaizeStreak1_5(1)nGrayLeafSpot1_5(1)nLeafBlightTurcicum1_5(1)nCommonRust1_5(1)nEarAspect1_5nGrainTexture1_5nAnthesisDatenHeteroticGroupnNumRowsnTryptophanPer_WholeGrain
18
19
20
21CIMMYT
22
23EntryStockNamePedigreeOriginEarsMSVGLSE.turcP.sorgEarGrainAnthHetNumSilkNotes
24IDSelectAspTexDateGroupRowsDate
251dgdggsdggsDgsdg9W
262D1692-2sdgSDGsdgSDGgsdg5Y
273dsgsdgsdggsdg9W
284sdgDL173850sdggsdgsgd5W
295D1692-5sdgDGSGsdggdsdg6W
306dgdggsdggsDgsdg5
317D1692-3sdgSDGsdgSDGgsdg4
328dsgsdgsdggsdg4
339sdgDL173851sdggsdgsgd3
3410dgdggsdggsDgsdg3
Entrylist
Cells with Data Validation
CellAllowCriteria
AA1:AQ1List=nNur


It is my hope that this is permitted. Thanks.
 
Upvote 0
I placed the first file in one folder and the second two files in a sub folder of the first. This was the result:
Book5
ABCDEFGHIJKL
1NurseryNameEntryStockIDNameBreedersPedigree1Origin
2Test-jskasango11D1565-5dfadfgafafhahhfdfhafdh
3Test-jskasango12D1565-7fdgadfhafdhadfhadfhafdh
4Test-jskasango13D1565-8dfghadfhfdahafdhadfhhadfh
5Test-jskasango14D1565-10dafaghadfhafhafdhafdadhf
6Test-jskasango15D1565-10dafaghadfhafhafdhafdadhf
7Test-jskasango16D1565-5dfadfgafafhahhfdfhafdh
8Test-jskasango17D1565-7fdgadfhafdhadfhadfhafdh
9Test-jskasango18D1565-8dfghadfhfdahafdhadfhhadfh
10Testjs-jskasango21D1449-53weqgtqeretqertqertgdgagagf
11Testjs-jskasango22D1179-99ertqerttertertqertgsd
12Testjs-jskasango23D1293-85erterttertertqertdsgga
13Testjs-jskasango24D1179-101ertretteertertqergadg
14Testjs-jskasango25D1411-12ertertdfgdfgddgdfgd
15Testjs-jskasango31dgdggsdggsDgsdg
16Testjs-jskasango32D1692-2sdgSDGsdgSDGgsdg
17Testjs-jskasango33dsgsdgsdggsdg
18Testjs-jskasango34sdgDL173850sdggsdgsgd
19Testjs-jskasango35D1692-5sdgDGSGsdggdsdg
20Testjs-jskasango36dgdggsdggsDgsdg
21Testjs-jskasango37D1692-3sdgSDGsdgSDGgsdg
22Testjs-jskasango38dsgsdgsdggsdg
23Testjs-jskasango39sdgDL173851sdggsdgsgd
24Testjs-jskasango310dgdggsdggsDgsdg
Sheet1
 
Upvote 0
SOLVED!!!!!!
My WBS were old!!! I edited this ===== If Right(oFile, 4) Like "xls*" Then to this ====== If Right(oFile, 3) Like "xl*" Then .

I am happy, very happy. Sorry for the embarrassment I have caused.
 
Upvote 0
@mumps .Wow! I was up the whole night just watching the code crunch the data. That would have taken me several MONTHS northwards!
Now I do not know where to say "If Sheet(EntryList) has no data, Skip and go to the next WB with a Sheet(EntryList)". I will be happy if it can do this because it stops executing when it encounters a Sheet(EntryList) that has no data. To proceed smoothly, I have been moving away such Workbooks and rerunning the code. Thanks in advance! - Kasango.
 
Upvote 0

Forum statistics

Threads
1,216,025
Messages
6,128,352
Members
449,443
Latest member
Chrissy_M

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