View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Minitman Minitman is offline
external usenet poster
 
Posts: 293
Default Retrieving Part of a Cell Contents

On Thu, 18 Sep 2008 12:16:11 -0700 (PDT), wrote:

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


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