Retrieving Part of a Cell Contents

M

Minitman

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
 
S

sbitaxi

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
 
M

Minitman

Hey Mike,

Thanks for the reply.

That is exactly what I was looking for. I was missing the "Search"
command.

Thank you.

-Minitman
 
M

Minitman

Hi Minitman,

This should do it for you.

MyString = ActiveCell.Value
PartString = Mid(MyString, InStr(MyString, "_") + 1, _
Len(MyString) - (InStr(MyString, "_")))


Steven

Hey Steven,

Thanks for the reply.

My mistake, I forgot to mention that I need a cell formula, not a vba
solution.

Thanks for trying.

-Minitman
 
R

Rick Rothstein

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.
 
M

Minitman

Noted.

-miniman

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.
 
Top