Match specific rows with a column

topi1

Active Member
Joined
Aug 6, 2014
Messages
252
Office Version
  1. 2010
I would like excel macro for the following function if someone could please help. Thank you.

1) Finds rows containing "TITLE1:" and "TITLE2:" in column R, sheet2.

2) Iterates through rows between "TITLE1:" and "TITLE2:" (excluding those two rows).

3) For each row, does the following.
i) Checks if column O, sheet2 is empty and column R, sheet2 doesn't contain ":". (Column R cell will contain other strings. Just checking if also happens to contain ":")
ii) Searches for a case-insensitive match in column A of "sheet1".
iii) If found, Concatenates columns B of sheet1 and R of sheet2, putting the result in column R of sheet2.
iv) No action if no match is found.

There will be intermittent empty rows in column R, sheet2.
Column A, sheet1 will have no blank cells. Although it will be nicer to allow blank cells but ONLY IF IT does not slow down the macro.

Thank you.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I think that you will be more likely to get some useful responses if your provided some smallish dummy sample data of both sheets and the expected outcome with XL2BB so helpers could easily copy and do some testing, knowing what the data & expected results are actually like.
 
Upvote 0

Forum statistics

Threads
1,224,748
Messages
6,180,721
Members
452,995
Latest member
isldboy

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