LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Text parsing - Extracting data from inconsistent data entry format.

I think I'd use the split function a couple of times inside a user defined
function. Try something like:
____________________________

Function MyExtract(strIn As String) As Long
arrayA = Split(strIn, "#")
arrayB = Split(LTrim(arrayA(1)), " ")
MyExtract = CLng(arrayB(0))
End Function
_______________________________


No need for the intermediate 'array' variables... you can combine it all
into one line:

Function MyExtract(strIn As String) As Long
MyExtract = CLng(Split(LTrim(Split(strIn, "#")(1)))(0))
End Function

Rick

 
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
text to columns with inconsistent data alignment Sarah Excel Discussion (Misc queries) 1 April 15th 09 08:48 AM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing [email protected] Excel Discussion (Misc queries) 0 March 20th 08 12:45 PM
saving text files and parsing data to spreadsheet priti Excel Programming 0 November 2nd 06 07:04 PM
format data displayed on Excel data entry form Bob, too Setting up and Configuration of Excel 0 May 19th 05 08:26 PM
Parsing Data with Formulas (vs Text-to-Columns) carl Excel Worksheet Functions 3 December 3rd 04 06:01 PM


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