PC Review


Reply
Thread Tools Rate Thread

Copying cells with similar column values

 
 
mohd21uk via OfficeKB.com
Guest
Posts: n/a
 
      12th May 2006
I have two worksheets in a spreadsheet with similar values in Sheet 1 Column
A and Sheet 2 Column A. I would like to create macro that would match like
values in column A in both sheets and copy the entire row in Sheet B to Sheet
A.

I have provided an example below:

Before:

Sheet 1

A B C D E
250 mE 1
300 YOU 2
360 ME 3

Sheet 2

A B C
250 Good 2905
300 Bad 1605
360 Good 5000


After

Sheet 1

A B C D E F
250 Me 1 250 Good 2905
300 You 2 300 Bad 1605

Many thanks in advance

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200605/1
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlndWVsIFphcGljbw==?=
Guest
Posts: n/a
 
      12th May 2006
You may use the VLOOKUP formula in columns E and F, something like:
=VLOOKUP(A1,Sheet2!$A$1:$C$3,2,FALSE) - column E
=VLOOKUP(A1,Sheet2!$A$1:$C$3,3,FALSE) - column F

You may need to change the range on the VLOOKUP to match your current range.

Hope this helps,
Miguel.

"mohd21uk via OfficeKB.com" wrote:

> I have two worksheets in a spreadsheet with similar values in Sheet 1 Column
> A and Sheet 2 Column A. I would like to create macro that would match like
> values in column A in both sheets and copy the entire row in Sheet B to Sheet
> A.
>
> I have provided an example below:
>
> Before:
>
> Sheet 1
>
> A B C D E
> 250 mE 1
> 300 YOU 2
> 360 ME 3
>
> Sheet 2
>
> A B C
> 250 Good 2905
> 300 Bad 1605
> 360 Good 5000
>
>
> After
>
> Sheet 1
>
> A B C D E F
> 250 Me 1 250 Good 2905
> 300 You 2 300 Bad 1605
>
> Many thanks in advance
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.a...l-new/200605/1
>

 
Reply With Quote
 
mohd21uk via OfficeKB.com
Guest
Posts: n/a
 
      15th May 2006
Is there a macro that would do just this.

Thanks

Miguel Zapico wrote:
>You may use the VLOOKUP formula in columns E and F, something like:
>=VLOOKUP(A1,Sheet2!$A$1:$C$3,2,FALSE) - column E
>=VLOOKUP(A1,Sheet2!$A$1:$C$3,3,FALSE) - column F
>
>You may need to change the range on the VLOOKUP to match your current range.
>
>Hope this helps,
>Miguel.
>
>> I have two worksheets in a spreadsheet with similar values in Sheet 1 Column
>> A and Sheet 2 Column A. I would like to create macro that would match like

>[quoted text clipped - 28 lines]
>>
>> Many thanks in advance


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200605/1
 
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 and color cells with similar values in a column using vba noname Microsoft Excel Programming 5 11th Jan 2011 12:05 PM
copying cells with similar text =?Utf-8?B?UmlwdGlkZQ==?= Microsoft Excel Misc 5 5th Sep 2007 02:18 PM
sum cells of one column that eqaul similar text in another column =?Utf-8?B?TWljaGFlbFRNOTk=?= Microsoft Excel Misc 1 14th Nov 2004 05:57 AM
Copying a column from several similar sheets into one sheet Lost Microsoft Excel Programming 3 17th Jun 2004 05:38 PM
Copying a column from several similar sheets into one sheet Lost Microsoft Excel Misc 1 16th Jun 2004 04:57 AM


Features
 

Advertising
 

Newsgroups
 


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