Insert new columns only when ID is the same in Excel -


i have 2 worksheets similar table structures looks this:

|   id   |     |   b   |   c   | +--------+-------+-------+-------+ |   1    |   x   |   x   |   x   | |   4    |   x   |   x   |   x   | |   12   |   x   |   x   |   x   | |   3    |   x   |   x   |   x   | |        | | ... (thousands of rows) 

where x values. possible create new table (or worksheet) combining 2 worksheets id worksheet1 same (similar sql query) resulting table like:

|   id   |     |   b   |   c   |   d   |   e   |   f   | +--------+-------+-------+-------+-------+-------+-------+ |   1    |   x   |   x   |   x   |   x   |   x   |   x   | |   4    |   x   |   x   |   x   |   x   |   x   |   x   | |   12   |   x   |   x   |   x   |   x   |   x   |   x   | |   3    |   x   |   x   |   x   |   x   |   x   |   x   | |        | | etc...  

note contents of worksheet1 added , not subtracted from. vba necessary or can done formula? thank you.

you can use vlookup solve this.

vlookup searches id in sheet2 , returns corresponding value in specified column number of selected table.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -