Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Extracting text before a known character

just adding to charle's code, if you don't want the underscore

var1 = Left(str1, InStr(1, str1, "_") - 1)


--


Gary


"Charles Chickering" wrote in
message ...
Var1 = Left(str1, InStr(1,str1,"_"))
--
Charles Chickering

"A good example is twice the value of good advice."


"Barb Reinhardt" wrote:

I'd like to extract all text in a string that appears before an underbar.
How would I do this programmatically?

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
Extracting characters before or after a specific character Brian Excel Worksheet Functions 4 April 27th 23 07:42 PM
extracting sheets on the basis of Row character Radhakant Panigrahi Excel Worksheet Functions 1 June 2nd 10 04:31 PM
extracting data to the right of a set character [email protected] Excel Worksheet Functions 8 August 21st 07 08:56 PM
looping thru range extracting data based on character gtslabs[_2_] Excel Programming 0 October 11th 06 10:41 PM
Extracting a character from a string of characters Sue Excel Discussion (Misc queries) 6 October 30th 05 01:35 AM


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