Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Find second to last value in cell

Unless most "right" or "left" functions in which one is looking to select the
"LAST" or the "FIRST" value within a string of characters within a call, I
wish to select the "SECOND TO LAST" value within a string of characters
within a call. IN other words, assume the string of characters of a cell
ends with "Fname Lname". I wish to select "Fname" from the character string
and place it in another column. Any ideas? Much appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Find second to last value in cell

=TRIM(LEFT(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),198),99))


"Eric_G" wrote:

Unless most "right" or "left" functions in which one is looking to select the
"LAST" or the "FIRST" value within a string of characters within a call, I
wish to select the "SECOND TO LAST" value within a string of characters
within a call. IN other words, assume the string of characters of a cell
ends with "Fname Lname". I wish to select "Fname" from the character string
and place it in another column. Any ideas? Much appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 376
Default Find second to last value in cell

Very nice solution, Teethless Mama!
--
Regards
Roger Govier

Teethless mama wrote:
=TRIM(LEFT(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),198),99))


"Eric_G" wrote:

Unless most "right" or "left" functions in which one is looking to select the
"LAST" or the "FIRST" value within a string of characters within a call, I
wish to select the "SECOND TO LAST" value within a string of characters
within a call. IN other words, assume the string of characters of a cell
ends with "Fname Lname". I wish to select "Fname" from the character string
and place it in another column. Any ideas? Much appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Find second to last value in cell

Looks like overkill to me, the RIGHT seems superfluous as it seems fine to
just use

=TRIM(LEFT(SUBSTITUTE(A1," ",REPT(" ",99)),99))

--

HTH

Bob

"Roger Govier" wrote in message
...
Very nice solution, Teethless Mama!
--
Regards
Roger Govier

Teethless mama wrote:
=TRIM(LEFT(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),198),99))


"Eric_G" wrote:

Unless most "right" or "left" functions in which one is looking to
select the "LAST" or the "FIRST" value within a string of characters
within a call, I wish to select the "SECOND TO LAST" value within a
string of characters within a call. IN other words, assume the string
of characters of a cell ends with "Fname Lname". I wish to select
"Fname" from the character string and place it in another column. Any
ideas? Much appreciated.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Find second to last value in cell

Oops, my mistake, I missed the OPs request for Second to last :-)

--

HTH

Bob

"Roger Govier" wrote in message
...
Very nice solution, Teethless Mama!
--
Regards
Roger Govier

Teethless mama wrote:
=TRIM(LEFT(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),198),99))


"Eric_G" wrote:

Unless most "right" or "left" functions in which one is looking to
select the "LAST" or the "FIRST" value within a string of characters
within a call, I wish to select the "SECOND TO LAST" value within a
string of characters within a call. IN other words, assume the string
of characters of a cell ends with "Fname Lname". I wish to select
"Fname" from the character string and place it in another column. Any
ideas? Much appreciated.





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
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
FIND / SEARCH text compare cell to string in 3rd cell nastech Excel Discussion (Misc queries) 0 October 29th 07 02:51 AM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
Change the appearance cell where Find criteria is found in a cell Tomszar Excel Discussion (Misc queries) 3 December 30th 05 02:48 PM


All times are GMT +1. The time now is 02:14 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"