Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Extracting (Copying) Text to the Right of a Hyphen

In this case it's a hypen but I assume it could be any symbol or letter. I
have text in column A in the following formats:

TEXT-01
TEXT-0004
TEXTTEXT-20
TEXTANDTEXT-1000

I want to get everything after the hyphen into column B

So column B would look like

-01
-0004
-20
-1000

I dont' really care if the hyphen is extracted or not. I'd like to know how
to do this both with and without extracting the hyphen. If possible.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Extracting (Copying) Text to the Right of a Hyphen

To extract with the hyphen:

=MID(A1,FIND("-",A1),255)

To extract without the hyphen:

=MID(A1,FIND("-",A1)+1,255)


--
Biff
Microsoft Excel MVP


"ConfusedNHouston" wrote in
message ...
In this case it's a hypen but I assume it could be any symbol or letter.
I
have text in column A in the following formats:

TEXT-01
TEXT-0004
TEXTTEXT-20
TEXTANDTEXT-1000

I want to get everything after the hyphen into column B

So column B would look like

-01
-0004
-20
-1000

I dont' really care if the hyphen is extracted or not. I'd like to know
how
to do this both with and without extracting the hyphen. If possible.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Extracting (Copying) Text to the Right of a Hyphen

=MID(A1,FIND("-",A1),255)

assuming there are no other hyphens earlier in the text string



--


Regards,


Peo Sjoblom

"ConfusedNHouston" wrote in
message ...
In this case it's a hypen but I assume it could be any symbol or letter.
I
have text in column A in the following formats:

TEXT-01
TEXT-0004
TEXTTEXT-20
TEXTANDTEXT-1000

I want to get everything after the hyphen into column B

So column B would look like

-01
-0004
-20
-1000

I dont' really care if the hyphen is extracted or not. I'd like to know
how
to do this both with and without extracting the hyphen. If possible.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Extracting (Copying) Text to the Right of a Hyphen

You can use a formula like

=MID(A1,FIND("-",A1),LEN(A1))

To make the "-" character a variable, put that character in some cell, say
C1, and use

=MID(A1,FIND(C1,A1),LEN(A1))

If the character isn't found, you'll get a #VALUE error.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)





"ConfusedNHouston" wrote in
message ...
In this case it's a hypen but I assume it could be any symbol or letter.
I
have text in column A in the following formats:

TEXT-01
TEXT-0004
TEXTTEXT-20
TEXTANDTEXT-1000

I want to get everything after the hyphen into column B

So column B would look like

-01
-0004
-20
-1000

I dont' really care if the hyphen is extracted or not. I'd like to know
how
to do this both with and without extracting the hyphen. If possible.

Thanks


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
Copy Text to Right of Hyphen ConfusedNHouston Excel Discussion (Misc queries) 3 July 27th 06 07:25 PM
Extracting Text Michael Excel Worksheet Functions 3 March 16th 06 07:32 PM
Truncating text before a hyphen tcjay Excel Worksheet Functions 1 September 6th 05 12:43 PM
Extracting Text only jtoy Excel Worksheet Functions 2 July 31st 05 02:30 AM
How do you change sort defaults for combined text number & hyphen. Anna Excel Discussion (Misc queries) 1 April 8th 05 05:01 AM


All times are GMT +1. The time now is 02:22 PM.

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

About Us

"It's about Microsoft Excel"