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 Extracting parts of names

Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Extracting parts of names

Try this:

=LEFT(A1,LEN(A1)-4)

Hope this helps.

Pete

On May 3, 6:03 pm, klysell .(donotspam) wrote:
Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Extracting parts of names

Is it always (17)?

=SUBSTITUTE(A2,"(17)","")

if not


=IF(ISNUMBER(FIND("(",A2)),TRIM(LEFT(A2,FIND("(",A 2)-1)),A2)


--
Regards,

Peo Sjoblom



"klysell" .(donotspam) wrote in message
...
Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in
the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 146
Default Extracting parts of names

Thanks Peo!

What if the value that I want to extract is contained in the sheet tab name?
For example, what if "kent, lysell(17)" or any other name and number (within
the parenthesis) is actually the sheet tab name? How can I refer to this name
and have its value extracted using the formula that you kindly supplied me?

Cheers!
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098


"Peo Sjoblom" wrote:

Is it always (17)?

=SUBSTITUTE(A2,"(17)","")

if not


=IF(ISNUMBER(FIND("(",A2)),TRIM(LEFT(A2,FIND("(",A 2)-1)),A2)


--
Regards,

Peo Sjoblom



"klysell" .(donotspam) wrote in message
...
Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in
the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Extracting parts of names

One way

=TRIM(LEFT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,34),FIND("(",MID(CELL("fi lename",A1),FIND("]",CELL("filename",A1))+1,34))-1))


the workbook has to be saved first





--
Regards,

Peo Sjoblom


"klysell" .(donotspam) wrote in message
...
Thanks Peo!

What if the value that I want to extract is contained in the sheet tab
name?
For example, what if "kent, lysell(17)" or any other name and number
(within
the parenthesis) is actually the sheet tab name? How can I refer to this
name
and have its value extracted using the formula that you kindly supplied
me?

Cheers!
--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098


"Peo Sjoblom" wrote:

Is it always (17)?

=SUBSTITUTE(A2,"(17)","")

if not


=IF(ISNUMBER(FIND("(",A2)),TRIM(LEFT(A2,FIND("(",A 2)-1)),A2)


--
Regards,

Peo Sjoblom



"klysell" .(donotspam) wrote in message
...
Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"?
I
don't want the "(17)" part. This should work no matter what spacing is
in
the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Extracting parts of names

=LEFT(A1,FIND("(",A1)-1)
--
David Biddulph

"klysell" .(donotspam) wrote in message
...
Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in
the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,

--
Kent Lysell
Financial Consultant
Ottawa, Ontario
W: 613.943.9098



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Extracting parts of names

On Thu, 3 May 2007 10:03:02 -0700, klysell .(donotspam)
wrote:

Hi,

Does anyone know how to extract "lysell, kent" from "lysell, kent(17)"? I
don't want the "(17)" part. This should work no matter what spacing is in the
name before the "(17)". For example, what if the text in a cell is
"lysell,kent(17)"? Or "lysell,kent M.(17)", etc.

Thanks in advance,



=TRIM(LEFT(A1,FIND("(",A1)-1))
--ron
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
extracting names CJ Excel Discussion (Misc queries) 10 January 11th 07 05:28 AM
Extracting names and suffixes Rookie_User Excel Discussion (Misc queries) 2 September 18th 06 05:53 PM
Extracting tab names MLK Excel Worksheet Functions 5 July 19th 06 08:52 PM
Extracting worksheet names.... johnT Excel Worksheet Functions 5 April 4th 05 02:39 PM
Extracting names in a cell bbc1 Excel Discussion (Misc queries) 2 February 13th 05 06:21 AM


All times are GMT +1. The time now is 04:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"