Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
Need suggestions for some uses of Ms Excel | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) |