Help with a conditional macro? [Solved/Closed]

Report
-
 Steve -
Hello,


I am trying to use VBA to check whether an M appears in column B and then, if it does, paste the information from that row (Columns A through to W) into another existing sheet in the workbook. I want this to be able to check the whole worksheet and then finish when it gets the the end of the information in column B.

Any ideas, I have been playing around with it for about 4 hours and have got nowhere!!!

Can anyone help me please?


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
Well from what I see
1. loop thru each loop
2. use "=" or instr (depending if it is a exact match or contains match) to check for M
3. If found copy the row and paste to other sheet
4. move to next row

rinse and repeat
Thanks for thatl. It's kind of what i thought I should be doing. Any ideas on the what the coed should look like. I am no good at getting it from scratch. Much better at finding a solution if thats possible and then changing it to suit my needs.

Cheers mate
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
Have you tried to use macro recorder. That can be a good step one
I'll do that right now. Thanks