Comparing worksheets

G

Guest

HI
This answer is probably somewhere in this forum, maybe not wording it
correctly.
What I have is 2 worksheets with names and various different information on
each.
eg
Sheet 1
Name CreditCard
Sheet 2
Name Address etc

What I want to do is compare the worksheets and if the name is on both
sheets to put a credit card in a new cell on sheet 2.
Thanking you
 
G

Guest

You could use Vlookup function.
The following example assumes 'Name' is in column A and the credit card in
in column B of sheet 1. The formula is in cell B2 of sheet 2.
=VLOOKUP(A2,Sheet1!$A$2:$B$101,2,FALSE)

A2 is the name on sheet 2

The data to look up is in array $A$2:$B$101. Note the $ signs for absolute
mode.

A match for A2 must be found in the first column of the lookup array.

The 2 means to insert the data from the 2nd column of the lookup array.

False means to get exact match not near match.

See help on Vlookup for more info.

#N/A will appear if match is not found.

Note the lookup array can be any number of columns so long as the data being
looked up is in the first column. The data to be inserted can be in any
column.

Regards,

OssieMac
 
G

Guest

Thankyou,



OssieMac said:
You could use Vlookup function.
The following example assumes 'Name' is in column A and the credit card in
in column B of sheet 1. The formula is in cell B2 of sheet 2.
=VLOOKUP(A2,Sheet1!$A$2:$B$101,2,FALSE)

A2 is the name on sheet 2

The data to look up is in array $A$2:$B$101. Note the $ signs for absolute
mode.

A match for A2 must be found in the first column of the lookup array.

The 2 means to insert the data from the 2nd column of the lookup array.

False means to get exact match not near match.

See help on Vlookup for more info.

#N/A will appear if match is not found.

Note the lookup array can be any number of columns so long as the data being
looked up is in the first column. The data to be inserted can be in any
column.

Regards,

OssieMac
 

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