compair 2 excel file's and import data from 1 to the other

S

Steven Van Laethem

Going to try explain

i have 1 excel file with 2 sheet

In the first sheet i only have 1 colom with 100 ticketnr's and in the other
sheet i have the sameticketnr's but also from other countries with more data
f.e. users name,comment's,....

What i want to do is that a "macro/... checked if a ticketnr from sheet 1
excists in sheet 2 and if it is that all users data is copieed from sheet 2
to sheet 1. Is this possible ? And if i can f.e. only copy 3 cell's rom sheet
2 to sheet 1, so not all data
 
S

smartin

Steven said:
Going to try explain

i have 1 excel file with 2 sheet

In the first sheet i only have 1 colom with 100 ticketnr's and in the other
sheet i have the sameticketnr's but also from other countries with more data
f.e. users name,comment's,....

What i want to do is that a "macro/... checked if a ticketnr from sheet 1
excists in sheet 2 and if it is that all users data is copieed from sheet 2
to sheet 1. Is this possible ? And if i can f.e. only copy 3 cell's rom sheet
2 to sheet 1, so not all data

You can use probably use VLOOKUP for this.

Suppose in Sheet2 columns A-C have ticketnr, name, comments.

Suppose further in Sheet1 column A has ticketnr with the first value in A2.

In Sheet1 B2: =VLOOKUP(A2,Sheet2!$A:$C,2,FALSE)
(this will return the name)

In Sheet1 C2: =VLOOKUP(A2,Sheet2!$A:$C,3,FALSE)
(this will return the comment)

Fill these formulas down as far as needed. They will return #N/A when no
matching ticketnr is found in Sheet2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top