Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Retrieving Part of a Cell Contents
|
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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) |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Looking Up Part Cell Contents | Excel Discussion (Misc queries) | |||
#N/A if cell contents not part of an array | Excel Discussion (Misc queries) | |||
Delete part of cell contents | Excel Programming | |||
IF statement that looks at part of the contents of a cell. | Excel Programming | |||
Web query - using cell contents as part of URL | Excel Programming |