close

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 quot;.quot; 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: www.excelforum.com/member.php...oamp;userid=16096
View this thread: www.excelforum.com/showthread...hreadid=517319=RIGHT(A1,LEN(A1)-FIND(quot;~quot;,SUBSTITUTE(A1,quot;.quot;,quot;~quot;,LEN(A1)-LEN(SUBSTITUTE(A1,quot;.quot;,))-1)))

--
Kind regards,

Niek Otten

quot;mzafarquot; gt; wrote in
message ...
gt;
gt; I have a spreadsheet with Comments field in one of the cells. Cell
gt; includes varying length comments, my goals is to read the last comment
gt; from this cell.
gt;
gt; So, really I am looking for a way to match anything after the last
gt; period quot;.quot; in this cell and display it in the formated report via
gt; Vlookup. I experimented with Left and right fuctions, however, no
gt; luck.
gt;
gt; Can someone please help. So, for instance the string can be something
gt; like:
gt;
gt; Hello. This is a test. Test number one.
gt;
gt; I would like to grab the last comment.
gt;
gt; Similary, string can be something like.
gt;
gt; Hello. This is a test. Test number one comes after number two. You
gt; must read test number one.
gt;
gt; Regards,
gt; John
gt;
gt;
gt; --
gt; mzafar
gt; ------------------------------------------------------------------------
gt; mzafar's Profile:
gt; www.excelforum.com/member.php...oamp;userid=16096
gt; View this thread: www.excelforum.com/showthread...hreadid=517319
gt;
How about this:

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

(all one cell)

mzafar wrote:
gt;
gt; I have a spreadsheet with Comments field in one of the cells. Cell
gt; includes varying length comments, my goals is to read the last comment
gt; from this cell.
gt;
gt; So, really I am looking for a way to match anything after the last
gt; period quot;.quot; in this cell and display it in the formated report via
gt; Vlookup. I experimented with Left and right fuctions, however, no
gt; luck.
gt;
gt; Can someone please help. So, for instance the string can be something
gt; like:
gt;
gt; Hello. This is a test. Test number one.
gt;
gt; I would like to grab the last comment.
gt;
gt; Similary, string can be something like.
gt;
gt; Hello. This is a test. Test number one comes after number two. You
gt; must read test number one.
gt;
gt; Regards,
gt; John
gt;
gt; --
gt; mzafar
gt; ------------------------------------------------------------------------
gt; mzafar's Profile: www.excelforum.com/member.php...oamp;userid=16096
gt; View this thread: www.excelforum.com/showthread...hreadid=517319

--

Dave Peterson


Thanks Dave/Niek, both solutions work great!

Regards,
John--
mzafar
------------------------------------------------------------------------
mzafar's Profile: www.excelforum.com/member.php...oamp;userid=16096
View this thread: www.excelforum.com/showthread...hreadid=517319

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()