PC Review


Reply
Thread Tools Rate Thread

Check whether text in a cell contains a string

 
 
Colin Macleod
Guest
Posts: n/a
 
      12th Jul 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2lnaQ==?=
Guest
Posts: n/a
 
      12th Jul 2007
Hi

you could go here

http://www.contextures.com/xlautofilter03.html#Copy

and adjust that general bit of code to suit.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Colin Macleod" wrote:

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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check if text string exists Keypad Microsoft Access Form Coding 5 25th May 2009 06:28 PM
VBA Function to Check if value in a String variable is actually a cell Address noname Microsoft Excel Programming 7 8th Oct 2007 11:16 PM
Macro syntax to check string length in a cell =?Utf-8?B?RWwgQmVl?= Microsoft Excel Misc 3 1st Nov 2006 09:13 PM
How to check whether a cell INCLUDES a given character string ModelerGirl Microsoft Excel Discussion 2 2nd Feb 2006 05:41 PM
check to see if cell contains a string = to member of list NikkoW Microsoft Excel Programming 1 1st May 2004 11:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 AM.