Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sue
 
Posts: n/a
Default To only get all text after a comma

I need a function to obtain just the first name from a cell but the cell has
the name written as:
Smith, Jack
I tried the the MID function but it requires a number to be entered to
dictate where it will start gathering the info. from. I will never know how
long their surname is so I would like something that will find the comma.
Then collect the first name Jack for example from the comma.
Can anyone help please.
Sue
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mikeopolo
 
Posts: n/a
Default To only get all text after a comma


If the text is in A1, then in B1 put =mid(a1,find(",",a1)+2,99)

where 99 is a value to make sure the longest first name is covered

This looks in a1, starting at a position 2 after the comma, ie it
assumes that the format always in cludese a blank space after the
comma

Regards
Mike


--
Mikeopolo
------------------------------------------------------------------------
Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570
View this thread: http://www.excelforum.com/showthread...hreadid=511635

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sue
 
Posts: n/a
Default To only get all text after a comma

Hi Mikeopolo,
Thanks, that works just great. Really appreciate it.
Regards Sue

"Mikeopolo" wrote:


If the text is in A1, then in B1 put =mid(a1,find(",",a1)+2,99)

where 99 is a value to make sure the longest first name is covered

This looks in a1, starting at a position 2 after the comma, ie it
assumes that the format always in cludese a blank space after the
comma

Regards
Mike


--
Mikeopolo
------------------------------------------------------------------------
Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570
View this thread: http://www.excelforum.com/showthread...hreadid=511635


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
Cell text based on 4 condition test Bob Wall Excel Worksheet Functions 3 November 16th 05 07:34 PM
Text Wrapping JMB Excel Discussion (Misc queries) 0 July 29th 05 02:41 AM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM
Autofitting a row Josephine Excel Discussion (Misc queries) 2 March 3rd 05 03:37 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 04:53 PM.

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"