View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Locate and length functions

x = Instr(String,"-")
y = left(string,x)

--
regards,
Tom Ogilvy

"Nigel Bennett" wrote in message
...
I am looking for a locate function, WHat I need to do is
find the length of a string up to the first instance of
particular character and determine how many characters are
before it, then use that result in a left statement

something like

x=length(string,locate("-"))
left(string,x)