Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default how to compare two columns on two sheets and copy associated data from one sheet to the other?

I have two sheets of data and Column A on both sheets has the same
type data (numbers) some numbers are the same on both sheets in Column
A, some are different, the numbers are not in the same order on both
sheets. Sheet1 also has a value in Columns Q & R in the same row that
is associated with Column A. I want to copy the value in Column Q&R
to Sheet 2 if the same number in column A exists on sheet 2. Can
anyone help me with this?
I have been trying to the use the VLOOKUP function , but am not having
any luck.

Sheet 1
Column A Column Q Column R
row1 5-123 test_01 details_and_code
row2 2-657 test_06 code
row3 5-1245 test_08 writing


Sheet 2
Column A Column Q Column R
row1 5-123
row2 4-4456
row3 5-1245

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default how to compare two columns on two sheets and copy associated data from one sheet to the other?

=VLOOKUP(A2,'Sheet1'!A:Z,17,0) --- for column Q
=VLOOKUP(A2,'Sheet1'!A:Z,18,0) --- for column R

HTH
Kostis Vezerides

On Jun 22, 4:51 pm, wrote:
I have two sheets of data and Column A on both sheets has the same
type data (numbers) some numbers are the same on both sheets in Column
A, some are different, the numbers are not in the same order on both
sheets. Sheet1 also has a value in Columns Q & R in the same row that
is associated with Column A. I want to copy the value in Column Q&R
to Sheet 2 if the same number in column A exists on sheet 2. Can
anyone help me with this?
I have been trying to the use the VLOOKUP function , but am not having
any luck.

Sheet 1
Column A Column Q Column R
row1 5-123 test_01 details_and_code
row2 2-657 test_06 code
row3 5-1245 test_08 writing

Sheet 2
Column A Column Q Column R
row1 5-123
row2 4-4456
row3 5-1245



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default how to compare two columns on two sheets and copy associated data from one sheet to the other?

Hi,

=VLOOKUP($A1,Sheet1!$A$1:$R$1000,COLUMN(),0)

in cell Q1 should work. Align last row (above: 1000) with your data
range. Formula can be copied downwards and to the right with excel
adjusting the cell references itself.

=IF(ISERROR(VLOOKUP($A1,Sheet1!$A$1:$R$1000,COLUMN (),
0)),"",VLOOKUP($A1,Sheet1!$A$1:$R$1000,COLUMN(),0) )

will return empty cells instead of error n/a for any number not to be
found on Sheet1.

Ingolf

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data from multiple sheets into new sheet Angie Excel Worksheet Functions 0 June 5th 07 10:53 PM
compare two columns data and bring them to another work sheet EXCEL USER Excel Discussion (Misc queries) 1 February 14th 07 08:42 PM
copy data from various sheets into one sheet vik Excel Worksheet Functions 2 April 14th 06 08:17 PM
copy data in one sheet to multiple sheets in same workbook BrianMultiLanguage Excel Worksheet Functions 4 July 27th 05 07:26 PM
in VBA Sheets("mysheet").Copy Befo=Sheets(1) how do i get a reference to the newly created copy of this sheet? Daniel Excel Worksheet Functions 1 July 6th 05 09:57 PM


All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"