SOLVED

Combine and align columns of data

%3CLINGO-SUB%20id%3D%22lingo-sub-1785440%22%20slang%3D%22en-US%22%3ECombine%20and%20align%20columns%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1785440%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20multiple%20worksheets%2C%20each%20with%20two%20columns%20of%20data.%20The%20first%20column%20on%20the%20left%20is%20names%20of%20students.%20The%20second%20column%20is%20their%20grade.%20I%20would%20like%20to%20combine%20all%20worksheets%20into%20one%2C%20maintaining%20the%20left%20column%20of%20student%20names%20and%20adding%20their%20three%20grade%20columns%20in%20the%20next%20columns%20over.%20I%20can't%20simply%20copy%20and%20paste%20them%20into%20one%20the%20names%20of%20students%20aren't%20aligned.%20I've%20tried%20the%20consolidate%20function%2C%20but%20the%20SUM%20function%20adds%20all%20their%20grades%20up%20into%20one%20column.%20I%20want%20to%20maintain%20the%20separate%20columns%20of%20grades%20but%20have%20that%20data%20aligned%20to%20the%20appropriate%20student%20name.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1785440%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1786005%22%20slang%3D%22en-US%22%3ERe%3A%20Combine%20and%20align%20columns%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1786005%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F834147%22%20target%3D%22_blank%22%3E%40clamb2060%3C%2FA%3E%2C%3C%2FP%3E%3CP%3ECan%20you%20use%20Vlookup%3F%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DVLOOKUP(A1%2C%5Bsource.xlsx%5DSheet1!%24A%3A%24B%2C2%2C0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BIn%20the%20example%20below%2C%20the%20source%20spreadsheet%20is%20on%20the%20left%20and%20the%20destination%20is%20on%20the%20right.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Bennadeau_0-1602795930353.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F227049i6BD8CDBBE673B493%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Bennadeau_0-1602795930353.png%22%20alt%3D%22Bennadeau_0-1602795930353.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1793363%22%20slang%3D%22en-US%22%3ERe%3A%20Combine%20and%20align%20columns%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1793363%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3BSolved!%20Thank%20you%20for%20your%20time.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi,

 

I have multiple worksheets, each with two columns of data. The first column on the left is names of students. The second column is their grade. I would like to combine all worksheets into one, maintaining the left column of student names and adding their three grade columns in the next columns over. I can't simply copy and paste them into one the names of students aren't aligned. I've tried the consolidate function, but the SUM function adds all their grades up into one column. I want to maintain the separate columns of grades but have that data aligned to the appropriate student name.

3 Replies
Highlighted

Hi @clamb2060,

Can you use Vlookup?

=VLOOKUP(A1,[source.xlsx]Sheet1!$A:$B,2,0)

 In the example below, the source spreadsheet is on the left and the destination is on the right.

Bennadeau_0-1602795930353.png

 

Highlighted
Best Response confirmed by clamb2060 (New Contributor)
Solution

@clamb2060 Easiest with Power Query (PQ). Are you familiar with that?

 

The attached workbook demonstrates a PQ solution. It's quick-and-dirty and far from perfect. Created structured tables from each of the score lists and queried them.

 

Your data is not clean as it contains scores from (presumably) the same persons but with their names spelled slightly different.

 

For example: 

Alexis R ( Alexis R ) vs. AlexisR ( Alexis R )

Elliot is verified ( Elliot L ) vs. Elliott is verified ( Elliot L )

and there are many more.

 

As the name between brackets seemed to be consistent, I used these to extract player names and create the table (in sheet Query1) with scores for each player.

 

As said, far from perfect, but I hope it gives you an idea of what is possible with PQ, in case you want to pursue this further. Otherwise, VLOOKUP or XlOOKUP will work as well, but you need to check and clean your data, and add a column with the V(X)LOOKUP formula, for every new score table you add. With PQ that goes automatic, provided all is set-up correctly.

 

Highlighted

@Riny_van_Eekelen Solved! Thank you for your time.