Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Return Portion of Variable

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Return Portion of Variable

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

RBS


"Benjamin" wrote in message
...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
making a portion of reference to a worksheet variable in a formula Celia Excel Discussion (Misc queries) 1 October 25th 09 08:27 AM
Formula to return a value for a portion of a text string in a cell NanGio Excel Discussion (Misc queries) 2 January 29th 09 10:36 PM
Return portion of Formula? Ken Excel Discussion (Misc queries) 1 January 8th 09 01:31 PM
return a portion of data entered into a cell Brian Excel Discussion (Misc queries) 1 January 9th 07 03:46 AM
Buttons in lower portion of workbook appear in upper portion ToferKing Excel Programming 1 April 22nd 06 06:46 PM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"