Check whether text in a cell contains a string

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top