How to combine columns from multiple workbooks?

blenderwala

New Member
Joined
Apr 5, 2022
Messages
8
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
I am working on a Classroom Files.


Where i have many files containing report of each test like Test 1, Test 2, Test 3...
I have to make a Master workbook that will contain the Mark Columns from All the Test Files


I tried the PowerQuery ( I am very much new to PQ) but failed as it was repeating the Name of the Students
I Just Need to Create A Master Workbook that will have Name of the Students and Marks of Each Test
Is there any Way to do this using PowerQuery or VBA


Thank You
 

Attachments

  • Excel Test Problem.jpg
    Excel Test Problem.jpg
    226.9 KB · Views: 9
  • Excel Test Solution.png
    Excel Test Solution.png
    58.5 KB · Views: 9

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
what you want is probably doable but would be helpful if you could upload to dropbox a couple sample files and a sample master file so we could test a solution against meaningful data
 
Upvote 0
Hi @vw412

Thank you for your response


I attached a link of those Files here

I just need to copy Mark's column from all test files to the master file. There are lots of files hence i can not use VLOOKUP.
It would be very helpful if you guide me to do this with Power Query or VBA


Thanks
 
Upvote 0
I got the files. Below is some thoughts I have for this VBA project.
VBA Code:
'
' Merge multiple source workbooks(worksheets) into one master file
'
' Source files consist of two columns: Name and TestScores
'
' Master file has one Name column and as many TestScores columns as source files
'
' Allow merging all files in a folder or selected files from a folder.  Selected files could be 1 or many
'
' When merging must match Name in each row of Master to Name in each row of Source.
' If Name not found in Master ask if needs added or skipped.
'
' Use source file name for TestScores column name in Master.
Please review these and comment.
 
Upvote 0
@Hi @vw412

Yes ! This is exactly what i want to achieve.

VBA would work but any thoughts on PowerQuery?


Thanks
 
Upvote 0
Unfortunately I do not know PowerQuery or how to use it.
 
Upvote 0
Hi @vw412

it's perfectly fine with VBA. I was just curious about PowerQuery

Thanks for your response.
 
Upvote 0

Forum statistics

Threads
1,215,929
Messages
6,127,743
Members
449,402
Latest member
jvivo3

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