Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



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
Replace a portion of a formula krkward Excel Discussion (Misc queries) 3 November 23rd 09 08:11 PM
match value within any portion of lookup string in range Hile Excel Worksheet Functions 3 October 16th 09 12:58 PM
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
how do i find and replace a portion of a cell's formula? KyWilde Excel Discussion (Misc queries) 2 November 3rd 06 02:49 AM
Bold a portion of concatenated string joeeng Excel Discussion (Misc queries) 1 December 8th 05 08:26 PM


All times are GMT +1. The time now is 10:15 AM.

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"