ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Merging 2 spreadsheets (https://www.excelbanter.com/new-users-excel/213006-merging-2-spreadsheets.html)

Gasbag

Merging 2 spreadsheets
 
Can I merge 2 spreadsheets based on the two left most columns and insert two
new columns in the merge? Spreadsheet 1 has surname, forename, addresses.
Spreadsheet 2 has surname, forename, username and password. I want to insert
the username and password from Sheet 2 into Sheet 1?
If anyone can help it would be great!

Max

Merging 2 spreadsheets
 
You could use a multi-criteria index/match
Something along these lines ..

Sheet2's data in cols A to D
where cols A, B are the match cols (surname-forename),
cols C & D contain the info to be extracted into Sheet1

In Sheet1,
In A2:B2 down are the coincident match data (surname-forename)
Put in D2, normal ENTER:
=INDEX(Sheet2!C$2:C$10,MATCH(1,INDEX((Sheet2!$A$2: $A$10=$A2)*(Sheet2!$B$2:$B$10=$B2),),0))
Copy D2 to E2, fill down as far as required to return cols C and D from
Sheet2 (username, password). Adapt the ranges to suit the actual extents of
data in Sheet2.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:365 Subscribers:65
xdemechanik
---
"Gasbag" wrote:
Can I merge 2 spreadsheets based on the two left most columns and insert two
new columns in the merge? Spreadsheet 1 has surname, forename, addresses.
Spreadsheet 2 has surname, forename, username and password. I want to insert
the username and password from Sheet 2 into Sheet 1?
If anyone can help it would be great!



All times are GMT +1. The time now is 04:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com