VBA Loop

fari1

Active Member
Joined
May 29, 2011
Messages
362
Hi Experts,

i need help with this code.
i've two columns each cell contains text strings, i want to match both of these text strings in another sheet and and copy data in between them.
any help please!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
if u could provide me with an email id, i can post u a workbook, that would be quiet helpful
 
Upvote 0
i've two sheets, sheet1 contains text strings in column A, every cell contains text strings.
sheet2 contains two columns,each column contains text strings,i want the code to loop through first column A of sheet2 and match that text string with sheet2 and then match the column B any text string with sheet1,if both of the strings get matched,then copy all the rows in between them.
e.g
in column A of sheet 2 contains "high up the mountains" "high up the roads" "high above clouds" in each cell down the column(it can be many more). i want to match each of this text string in sheet1
and now in column B contains "climb the mountains" drive very fast" "fly in the air".
then i want to match first column A in sheet1 and then column B in sheet1 and copy all the rows in between.

hope i made it clear
 
Upvote 0
Sorry I can't really grasp what you mean.
Its late here, I wouldn't have time to go through the workbook.

I suggest you post an example.

cheers
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,448
Members
452,915
Latest member
hannnahheileen

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
Back
Top