Return Portion of Variable

B

Benjamin

I have a variable Being the Cell's contents (Which are the file path name)

i.e. I'm using the file path, and it's important that I search the variable
Documents\Priority
Documents\Concerns
Documents\Attachments

I want to do an if statement for all paths that have
Documents in the variable I want to do "Action B" for example and everything
else:
"Action A"

How to I search for just "Documents" in the Variable
 
R

RB Smissaert

Lookup the Left function (best to use Left$ as it is faster) or Instr in the
VBA help.

RBS
 

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