Excel / VBA - A macro to check the value of a column


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 end of the information in column B. Any ideas, I have been playing around with it for about 4 hours and have got nowhere!!!


  • use "=" or instr (depending if it is a exact match or contains match) to check for M
  • If found copy the row and paste to other sheet
  • move to next row
  • rinse and repeat


Solved by rizvisa1
Published by aakai1056. Latest update on May 24, 2012 at 01:11 PM by aakai1056.
This document, titled "Excel / VBA - A macro to check the value of a column," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Outlook - Delay the sending of mails
Microsoft Word - How to open ODT/ODF files