Compare and copy data from one column to another [Solved/Closed]

VBLearner 3 Posts Monday November 19, 2012Registration date November 20, 2012 Last seen - Nov 19, 2012 at 10:52 AM - Latest reply: Zohaib R 2421 Posts Sunday September 23, 2012Registration date July 16, 2018 Last seen
- Nov 20, 2012 at 05:04 PM
Hello,

I'm trying to compare column A in Sheet 1 with column A in Sheet 2, then copy corresponding values in column N from sheet 1 to column N in Sheet 2 (where the column A values match). Also, the values in Column A Sheet 1 might not be in the same order or sequence as the values in Column A Sheet 2.

Appreciate any help!
See more 

4 replies

Zohaib R 2421 Posts Sunday September 23, 2012Registration date July 16, 2018 Last seen - Nov 19, 2012 at 12:06 PM
0
Thank you
Hi VBLearner,

You can use the Vlookup worksheet function to accomplish this task. According to your explanations I prepared the following sheet:

Sheet1
________________________________________________________________
VluesASheet1 ValuesNSheet1
________________________________________________________________
Name01 ABCD01
Name02 ABCD02
Name03 ABCD03
Name04 ABCD04
Name05 ABCD05
Name06 ABCD06
Name07 ABCD07
________________________________________________________________

Sheet2
________________________________________________________________
ValuesASheet2 ValuesNSheet2
________________________________________________________________
Name01 ABCD01
Name02 ABCD02
Name09
Name10
Name11
Name12
Name13
________________________________________________________________

Use the below mentioned formula in column N of Sheet2:

=VLOOKUP(A2,Sheet1!A2:N8,14,0)

You must replace Sheet1!A2:N8 with your range of data in Sheet1. You can see that Name 01 and Name02 is common in both the sheets so a value is present in column N of sheet2.

Please revert for clarification.
VBLearner 3 Posts Monday November 19, 2012Registration date November 20, 2012 Last seen - Nov 20, 2012 at 07:29 AM
0
Thank you
I tried using the formula you mentioned and modified the range value and the sheet name according to the data I have and still it's not working. I am getting the error #Name. Here's what I used: =VLOOKUP(A2,All Requirements!A2:N7677,14,0).
VBLearner 3 Posts Monday November 19, 2012Registration date November 20, 2012 Last seen - Nov 20, 2012 at 03:18 PM
0
Thank you
Thanks, the formula you gave initially works. I was missing the quotes on the Sheet 1 name.
Thanks for your help!
Zohaib R 2421 Posts Sunday September 23, 2012Registration date July 16, 2018 Last seen - Nov 20, 2012 at 05:04 PM
0
Thank you
Hi VBLearner,

Replace:

=VLOOKUP(A2,All Requirements!A2:N7677,14,0)

With:

=VLOOKUP(A2,'All Requirements'!A2: N7677,14,0)

Note the quotes in the above formula. "All Requirements" should always be enclosed in quotes if it a sheet in the same excel file.

Please revert for clarification.