View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ken Valenti Ken Valenti is offline
external usenet poster
 
Posts: 40
Default Locate and length functions

Try the find function in Excel or the instr() in VBA

"Nigel Bennett" wrote:

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)