Using wildcards with the "Like" command

T

Tim Patton

Help !

I want to check values in a column to see if the match a
certain value. I want to use a wildcard to save lines but
I am not sure how the "like" command works.

Can anybody help ?

Cheers and thanks

Tim
 
C

Chip Pearson

Tim,

Try something like

If Range("A1").Value Like "ABC*" Then

This will match any string beginning with the letters "ABC".


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 

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