Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default Omitting right part of text string

Hi,

I want to omit the right part of a text string that starts with "(" and ends
in ")" while returning the left part of the text string. I would have a cell
that contains a name such as "Lysell, Kent". Right after this name a number
in parenthesis is concatenated. For example, I would need to return only
"Lysell, Kent" from "Lysell, Kent(111)". This number might be 1 to 4 digits
long. Is there a formula that would omit this number in parethesis -
including the parenthesis - while returning just the name?

Thanks in advance!
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Omitting right part of text string

Give this a try (assuming your text is in A1)...

=LEFT(A1,FIND("(",A1&"(")-1)

Rick



"klysell" wrote in message ...
Hi,

I want to omit the right part of a text string that starts with "(" and ends
in ")" while returning the left part of the text string. I would have a cell
that contains a name such as "Lysell, Kent". Right after this name a number
in parenthesis is concatenated. For example, I would need to return only
"Lysell, Kent" from "Lysell, Kent(111)". This number might be 1 to 4 digits
long. Is there a formula that would omit this number in parethesis -
including the parenthesis - while returning just the name?

Thanks in advance!
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default Omitting right part of text string

Thanks guys...
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557


"Don Guillett" wrote:

Sub trimcells()
mc = "G"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(2, mc), Cells(lr, mc))
c.Value = Left(c, InStr(c, "(") - 1)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"klysell" wrote in message
...
Hi,

I want to omit the right part of a text string that starts with "(" and
ends
in ")" while returning the left part of the text string. I would have a
cell
that contains a name such as "Lysell, Kent". Right after this name a
number
in parenthesis is concatenated. For example, I would need to return only
"Lysell, Kent" from "Lysell, Kent(111)". This number might be 1 to 4
digits
long. Is there a formula that would omit this number in parethesis -
including the parenthesis - while returning just the name?

Thanks in advance!
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.948-9557



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
Formula to return part of a text string luvthavodka Excel Discussion (Misc queries) 9 October 20th 08 05:27 PM
How do I extract part of a text string Brennan Excel Discussion (Misc queries) 2 November 28th 06 07:26 PM
removing part of text string to another cell jamie_k Excel Discussion (Misc queries) 2 July 24th 06 10:57 AM
Use a formula to delete part of a text string? Josh Craig Excel Worksheet Functions 4 June 29th 06 08:19 AM
Omitting Part of the Y-Axis Dave McGuire Charts and Charting in Excel 2 July 25th 05 10:39 AM


All times are GMT +1. The time now is 03:43 PM.

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"