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

June 2017




Issue


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!!!

Solution

  • 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

Note


Solved by rizvisa1

Related


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 (ccm.net).