#1   Report Post  
Posted to microsoft.public.excel.misc
mzafar
 
Posts: n/a
Default Substrings in Excel?


I have a spreadsheet with Comments field in one of the cells. Cell
includes varying length comments, my goals is to read the last comment
from this cell.

So, really I am looking for a way to match anything after the last
period "." in this cell and display it in the formated report via
Vlookup. I experimented with Left and right fuctions, however, no
luck.

Can someone please help. So, for instance the string can be something
like:

Hello. This is a test. Test number one.

I would like to grab the last comment.

Similary, string can be something like.

Hello. This is a test. Test number one comes after number two. You
must read test number one.

Regards,
John


--
mzafar
------------------------------------------------------------------------
mzafar's Profile: http://www.excelforum.com/member.php...o&userid=16096
View this thread: http://www.excelforum.com/showthread...hreadid=517319

  #2   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Substrings in Excel?

=RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1,".","~",LEN(A1)-LEN(SUBSTITUTE(A1,".",))-1)))

--
Kind regards,

Niek Otten

"mzafar" wrote in
message ...

I have a spreadsheet with Comments field in one of the cells. Cell
includes varying length comments, my goals is to read the last comment
from this cell.

So, really I am looking for a way to match anything after the last
period "." in this cell and display it in the formated report via
Vlookup. I experimented with Left and right fuctions, however, no
luck.

Can someone please help. So, for instance the string can be something
like:

Hello. This is a test. Test number one.

I would like to grab the last comment.

Similary, string can be something like.

Hello. This is a test. Test number one comes after number two. You
must read test number one.

Regards,
John


--
mzafar
------------------------------------------------------------------------
mzafar's Profile:
http://www.excelforum.com/member.php...o&userid=16096
View this thread: http://www.excelforum.com/showthread...hreadid=517319



  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Substrings in Excel?

How about this:

=TRIM(MID(A1,FIND("^",SUBSTITUTE(A1,".","^",LEN(A1 )
-LEN(SUBSTITUTE(LEFT(A1,LEN(A1)-1),".",""))
-(RIGHT(A1,1)=".")))+1,LEN(A1)))

(all one cell)

mzafar wrote:

I have a spreadsheet with Comments field in one of the cells. Cell
includes varying length comments, my goals is to read the last comment
from this cell.

So, really I am looking for a way to match anything after the last
period "." in this cell and display it in the formated report via
Vlookup. I experimented with Left and right fuctions, however, no
luck.

Can someone please help. So, for instance the string can be something
like:

Hello. This is a test. Test number one.

I would like to grab the last comment.

Similary, string can be something like.

Hello. This is a test. Test number one comes after number two. You
must read test number one.

Regards,
John

--
mzafar
------------------------------------------------------------------------
mzafar's Profile: http://www.excelforum.com/member.php...o&userid=16096
View this thread: http://www.excelforum.com/showthread...hreadid=517319


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
mzafar
 
Posts: n/a
Default Substrings in Excel?


Thanks Dave/Niek, both solutions work great!

Regards,
John


--
mzafar
------------------------------------------------------------------------
mzafar's Profile: http://www.excelforum.com/member.php...o&userid=16096
View this thread: http://www.excelforum.com/showthread...hreadid=517319

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
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
Need suggestions for some uses of Ms Excel Bible John Excel Discussion (Misc queries) 1 February 27th 06 05:30 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


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