Help with a conditional macro?

Solved/Closed
Steve - Aug 6, 2010 at 09:33 AM
 Steve - Aug 7, 2010 at 06:48 AM
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 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Aug 6, 2010 at 11:05 AM
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
0
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
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Aug 6, 2010 at 04:43 PM
Have you tried to use macro recorder. That can be a good step one
0
I'll do that right now. Thanks
0