Searching and Pulling from a Range VBA

HTMLGhozt

New Member
Joined
Jun 4, 2015
Messages
38
Hello,

I would say I'm relatively new to VBA in particular, and this site as well (it's my first post!).

I am working with Excel 2010.

I need help designing a macro to search a range (B, C in the case of the table below) and based on if a cell in the range has text (B1, B3, B5, B7, C1, C4, C5), for the macro to copy that cell and a cell from column A (A1 & B1, A1 & C1, A3 & B3, etc.) to paste into output in the order of column A then the other column.

ABCOutput
1John SmithNot PaidNot in Payroll SystemJohn Smith Not Paid
2James SmithJohn Smith Not in Payroll System
3Matthew SmithNot PaidMatthew Smith Not Paid
4Michelle PfeifferIs an actressMichelle Pfeiffer Is an actress
5HTMLGhoztNot PaidIs me!HTMLGhozt Not Paid
6Stacy KeiblerHTMLGhozt Is me!
7Apples GaloreIs ApplesApples Galore Is Apples

<tbody>
</tbody>

If you have any questions please ask!
 
Last edited:
HTMLGhozt,

Thanks for the feedback.

You are very welcome. Glad I could help.

And, come back anytime.
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,216,085
Messages
6,128,733
Members
449,465
Latest member
TAKLAM

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