Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default 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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 293
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking Up Part Cell Contents Steve Excel Discussion (Misc queries) 2 April 22nd 09 05:20 PM
#N/A if cell contents not part of an array MichaelR Excel Discussion (Misc queries) 5 June 28th 08 03:09 AM
Delete part of cell contents nxqviet Excel Programming 3 December 20th 06 11:24 PM
IF statement that looks at part of the contents of a cell. Jon[_21_] Excel Programming 3 November 9th 05 04:27 PM
Web query - using cell contents as part of URL claytorm[_2_] Excel Programming 1 July 29th 04 04:16 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"