Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Comparing worksheets
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Comparing worksheets
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 "enna49" wrote: 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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Comparing worksheets
Thankyou,
"OssieMac" wrote: 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 "enna49" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comparing two worksheets | Excel Discussion (Misc queries) | |||
Comparing worksheets | Excel Worksheet Functions | |||
Comparing 5 worksheets | Excel Worksheet Functions | |||
Comparing two different Worksheets | Excel Worksheet Functions | |||
Comparing Two Worksheets for changes | Excel Discussion (Misc queries) |