ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combining data (https://www.excelbanter.com/excel-discussion-misc-queries/107077-combining-data.html)

Jayne

Combining data
 
If i have data in 2 worksheets with a unique number at the start can i
combine the data from both in one sheet:

Sheet 1:
Number + email address
9876

Sheet 2:
Number + address
9876 12 Commercial road

Desired out come sheet3:
Number + email address + address
9876
12 commercial road


tim m

Combining data
 
You could us VLOOKUP for this.

In sheet three in the cell to the right of your number try this:

=VLOOKUP(A1,Sheet1!A1:B1,2,FALSE)

and in the cell to the right of that one:

=VLOOKUP(A1,Sheet2!A1:B1,2,FALSE)

The first formula looks at A1 in sheet 3 which is your number, it then goes
to Sheet 1 and looks at the data you have hi-lited (the numbers and names) to
find your number. It then looks at the 2nd column of that data (which is the
email in your sample date. The FALSE tells it to look for an exact number
match.

The 2nd forumla does the same thing excpet it is looking for the address in
sheet 2.

"Jayne" wrote:

If i have data in 2 worksheets with a unique number at the start can i
combine the data from both in one sheet:

Sheet 1:
Number + email address
9876

Sheet 2:
Number + address
9876 12 Commercial road

Desired out come sheet3:
Number + email address + address
9876
12 commercial road


Bernard Liengme

Combining data
 
In the numbers are in the same order in both worksheets: use formulas such
as =Sheet1!A1 and =Sheet2!C1 in Sheet3 to extract data from Sheet1 and
Sheet2. Or use Copy and Paste

If the ID's are not in the same order have a peek in Help at VLOOKUP and
come back if you need help with that function.

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Jayne" wrote in message
...
If i have data in 2 worksheets with a unique number at the start can i
combine the data from both in one sheet:

Sheet 1:
Number + email address
9876

Sheet 2:
Number + address
9876 12 Commercial road

Desired out come sheet3:
Number + email address + address
9876
12 commercial road





All times are GMT +1. The time now is 06:43 AM.

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