Check whether text in a cell contains a string

  • Thread starter Thread starter Colin Macleod
  • Start date Start date
C

Colin Macleod

I want to copy selected rows from a database on one worksheet to another
worksheet. The criteria will be whether the text in column C (for example)
contains a string that is input by the user. So if cell c5 contains "Europe"
and the user has input "rope" (into a text box on a user form) then the
entire record on row 5 would be copied.

I know this can be done via AutoFilter then Custom then Contains - but this
is part of a VBA project so I need some VBA code to do this.

All help gratefully appreciated.

Colin Macleod
 
Back
Top