Comparing and pasting from sheet to sheet.

rdeters

New Member
Joined
May 6, 2002
Messages
40
This is what I am trying to do:

When the text in cell 'A2' on 'sheet 1' is equal to the text in 'column A' on 'sheet 2', paste the text from the following 10 cells in that row from 'sheet 2' into cells 'B2 through to K2' on 'sheet 1' (ie. 10 cells).
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

rdeters

New Member
Joined
May 6, 2002
Messages
40
Tryingtolearn,

I am trying to follow the VB basic programming. Mind you I am not a VB expert. The difference with my question is that I don't have a specific text I am searching for,(such as 'page1' which was stated in the other post).
In 'sheet 1' 'row A' I have over 1000 cells with different text. In 'sheet 2'
each cell in 'row A' is different. Whenever a value on sheet 1 within row A appears on sheet 2, I want to take the following 10 cells in that matching row and paste them onto sheet 1 (b2 to k2).

I tried the VB code that was included in the other post but did not have much luck. Thanks for the link but are there any other suggestions out there?
 

just_jon

Legend
Joined
Sep 3, 2002
Messages
10,473
Is this a 1-time shot, or something that would need to be done repetitively? I ask because if 1-time, VLOOKUP-INDEX/MATCH might be quicker than VBA.
 

just_jon

Legend
Joined
Sep 3, 2002
Messages
10,473
rdeters said:
This is what I am trying to do:

When the text in cell 'A2' on 'sheet 1' is equal to the text in 'column A' on 'sheet 2', paste the text from the following 10 cells in that row from 'sheet 2' into cells 'B2 through to K2' on 'sheet 1' (ie. 10 cells).

In sheet1, B2 --

=VLOOKUP($A2,'sheet 2'!$A$1:$K$1000,COLUMN(),0)

where 1000 is your last row on sheet2. Copy accross and down.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,322
Messages
5,769,452
Members
425,548
Latest member
macjagger17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top