Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to replace defined portion of string
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to replace defined portion of string
This formula finds the left bracket and takes characters to there. =LEFT(A1,FIND("(",A1)-1 -- Brian ----------------------------------------------------------------------- BrianB's Profile: http://www.excelforum.com/member.php...tinfo&userid=5 View this thread: http://www.excelforum.com/showthread.php?threadid=38828 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace a portion of a formula | Excel Discussion (Misc queries) | |||
match value within any portion of lookup string in range | Excel Worksheet Functions | |||
Formula to return a value for a portion of a text string in a cell | Excel Discussion (Misc queries) | |||
how do i find and replace a portion of a cell's formula? | Excel Discussion (Misc queries) | |||
Bold a portion of concatenated string | Excel Discussion (Misc queries) |