Retrieving Part of a Cell Contents
Greetings,
I have a column of text that has a "_" in the middle of the text. This "_" is in different places in these cells. I want to get all of the text after these "_" and have it show up in the adjacent cells. I took a look at Left, Right and Mid, but they don't seem to be able to start with a character only a position. Is there anyway to use a character to start character retrieval instead of position? Any help would be appreciated. -Minitman |
Retrieving Part of a Cell Contents
Try this
=MID(A1,SEARCH("_",A1)+1,LEN(A1)) Mike "Minitman" wrote: Greetings, I have a column of text that has a "_" in the middle of the text. This "_" is in different places in these cells. I want to get all of the text after these "_" and have it show up in the adjacent cells. I took a look at Left, Right and Mid, but they don't seem to be able to start with a character only a position. Is there anyway to use a character to start character retrieval instead of position? Any help would be appreciated. -Minitman |
Retrieving Part of a Cell Contents
On Sep 18, 3:00*pm, Minitman wrote:
Greetings, I have a column of text that has a "_" in the middle of the text. This "_" is in different places in these cells. *I want to get all of the text after these "_" and have it show up in the adjacent cells. I took a look at Left, Right and Mid, but they don't seem to be able to start with a character only a position. Is there anyway to use a character to start character retrieval instead of position? Any help would be appreciated. -Minitman Hi Minitman, This should do it for you. MyString = ActiveCell.Value PartString = Mid(MyString, InStr(MyString, "_") + 1, _ Len(MyString) - (InStr(MyString, "_"))) Steven |
Retrieving Part of a Cell Contents
Hey Mike,
Thanks for the reply. That is exactly what I was looking for. I was missing the "Search" command. Thank you. -Minitman On Thu, 18 Sep 2008 12:10:01 -0700, Mike H wrote: Try this =MID(A1,SEARCH("_",A1)+1,LEN(A1)) Mike "Minitman" wrote: Greetings, I have a column of text that has a "_" in the middle of the text. This "_" is in different places in these cells. I want to get all of the text after these "_" and have it show up in the adjacent cells. I took a look at Left, Right and Mid, but they don't seem to be able to start with a character only a position. Is there anyway to use a character to start character retrieval instead of position? Any help would be appreciated. -Minitman |
Retrieving Part of a Cell Contents
|
Retrieving Part of a Cell Contents
My mistake, I forgot to mention that I need a cell formula,
not a vba solution. Since this is a programming newsgroup, it will normally provide VBA solutions. If you are seeking formula solutions in the future, the microsoft.public.excel.worksheet.functions would be a better newsgroup to post to for them. -- Rick (MVP - Excel) |
Retrieving Part of a Cell Contents
Noted.
-miniman On Thu, 18 Sep 2008 20:55:35 -0400, "Rick Rothstein" wrote: My mistake, I forgot to mention that I need a cell formula, not a vba solution. Since this is a programming newsgroup, it will normally provide VBA solutions. If you are seeking formula solutions in the future, the microsoft.public.excel.worksheet.functions would be a better newsgroup to post to for them. |
All times are GMT +1. The time now is 01:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com