View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default How to replace defined portion of string

I assume you mean in VBA

Debug.Print Left(sFormula, InStr(1, sFormula, "(") - 1)


--
HTH

Bob Phillips

"ExcelMonkey" wrote in message
...
Lets say I have a string: Sum(A1:A5).

This string will always be a formula. I want to redefine it without the

the
brackets. That I only want to see: Sum

How do I do this. Can I use the replace function? I will always want to
replace everything within the brackets and including the brackets with "".

Thanks