PC Review


Reply
Thread Tools Rate Thread

how to compare two columns on two sheets and copy associated data from one sheet to the other?

 
 
meghantrus@hotmail.com
Guest
Posts: n/a
 
      22nd Jun 2007
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.
I have attempted VLOOKUP function, but have not been successful. Can
anyone assist me?

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 2-657

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      22nd Jun 2007
in B2 of Sheet2
=if(iserror(match(A2,Sheet1!A:A,0)),"",Index(Sheet1!Q:Q,Match(A2,Sheet1!A:A,0),1))

In C2
=if(iserror(match(A2,Sheet1!A:A,0)),"",Index(Sheet1!R:R,Match(A2,Sheet1!A:A,0),1))

Drag fill down.

If you wanted them concatenated

=if(iserror(match(A2,Sheet1!A:A,0)),"",Index(Sheet1!Q:Q,Match(A2,Sheet1!A:A,0),1)&Index(Sheet1!R:R,Match(A2,Sheet1!A:A,0),1))

--
Regards,
Tom Ogilvy

"(E-Mail Removed)" 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.
> I have attempted VLOOKUP function, but have not been successful. Can
> anyone assist me?
>
> 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 2-657
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two wk sheets with common data using copy paste macro =?Utf-8?B?Y29uZWpv?= Microsoft Excel Worksheet Functions 0 8th Oct 2007 09:21 AM
Compare 2 sheets and copy matching data Sarah Microsoft Excel Programming 3 18th Jul 2007 04:47 PM
how to compare two columns on two sheets and copy associated data from one sheet to the other? meghantrus@hotmail.com Microsoft Excel Worksheet Functions 2 22nd Jun 2007 03:40 PM
compare two columns data and bring them to another work sheet =?Utf-8?B?RVhDRUwgVVNFUg==?= Microsoft Excel Misc 1 14th Feb 2007 08:42 PM
Compare data with in a couple of sheets then output to a blank sheet Sabo, Eric Microsoft Excel Programming 0 22nd Feb 2006 03:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:40 PM.