Retrieving Part of a Cell Contents

  • Thread starter Thread starter Minitman
  • Start date Start date
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
 
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
 
Hey Mike,

Thanks for the reply.

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

Thank you.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top