Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Delete everything after a certain character?

Anyone have a formula or vb code that will delete everything from cell A1 after a certain character (ie "(" ) and populate cell B1 with what remains?

TIA
-Chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Delete everything after a certain character?

Chris,
=MID(A2,SEARCH("(",A2)+1,LEN(A2))
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Chris" wrote in message
...
Anyone have a formula or vb code that will delete everything from cell A1

after a certain character (ie "(" ) and populate cell B1 with what remains?

TIA
-Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Delete everything after a certain character?

Chris,

In code you can use Instr(1, str1, str 2) to locate you character. And
inbed this in a Left(str 1, Instr()-1) to get your string.
Range("A2") = Left(Range("A1"), InStr(1, Range("A1"), "(") - 1)

hth
--
steveb
(Remove 'NoSpam' from email address if replying direct)
"Chris" wrote in message
...
Anyone have a formula or vb code that will delete everything from cell A1

after a certain character (ie "(" ) and populate cell B1 with what remains?

TIA
-Chris



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
Delete special character Kiannie Excel Discussion (Misc queries) 3 April 2nd 09 11:24 PM
How to remove (delete) the first Character in all of the columns [email protected] Excel Discussion (Misc queries) 8 January 19th 07 08:30 PM
How do I delete the last character in a field in Excell? andrewcodd New Users to Excel 1 June 9th 06 01:06 PM
Delete all occurrences of a character Harleygrrl814 New Users to Excel 8 May 11th 05 05:15 PM
Delete Asc(10) character from cell Rocky McKinley Excel Programming 7 June 12th 04 03:21 PM


All times are GMT +1. The time now is 10:09 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"