• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Combine two tables

Hi Folks,

Could you please let me know how to attach these two tables. Please refer the attached file. Table 1 and Table 1 there is common column name is Role i have highlighted the same.
Thanks.
 

Attachments

  • table combine.xlsx
    10.5 KB · Views: 8
... then You would get more rows and some cells would be empty.
...
and those 'tables' ... were sheets or how?
 

Attachments

  • table combine.xlsx
    10.8 KB · Views: 7
Without clear rules, You can only guess ...
eg copy above cells to empty cells
... but who knows? ... someone would care!
Already those copied cells can or cannot be in correct places!
 
Using Power Query, file attached, I loaded both tables into PQ. Joined the two tables (Left Outer Join) based upon the common field.

Code:
let
    Source = Table.NestedJoin(#"Table 1", {"Column1"}, #"Table 2", {"Column3"}, "Table 2", JoinKind.LeftOuter),
    #"Expanded Table 2" = Table.ExpandTableColumn(Source, "Table 2", {"Column1", "Column2"}, {"Column1.1", "Column2.1"})
in
    #"Expanded Table 2"
 

Attachments

  • Book5.xlsx
    171.9 KB · Views: 7
Back
Top