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

October 2016


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

Related :

This document entitled « Excel / VBA - A macro to check the value of a column » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.