|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
Parsing a line in Excel using VBScripting
Anyone has a good function I can use?
InStr or Midstr? |
#2
|
||
|
what are you trying to accomplish? (split a string, pull data from it, etc)
from what I remember, instr basicaly checks that a substring is in the string mid() will pull letters from the given string, starting where you tell it to and the length to pull out. IcI |
#3
|
||
|
Yep. Pulling data from row # 5 of an Excel File.
Looking for 9 digit and 5 digits on the row. |
#4
|
||
|
can you give a example of what the line looks like? as is the line consistently the same?
An other thought, are you pulling this data from an excel sheet that is open up and are the numbers your trying to get in their own cells? IcI |
#5
|
||
|
Yep
ADJASDHj: 123456789 00000000 ASDSDHS: 1234567 They are on row 5 column A |
#6
|
||
|
I had an reply all typed up, went to submit it, submission failed
Ok, I did what it looks like your trying to do: But this method will only work if the length of each field stays the same if you have multiple rows like your sample (ie, all the letter and number groupings stay the same length, only the data changes) using cell A12 for my source, and copying your sample I put the first group of numbers you have bolded into cell A15 by entering "=MID(A12,10,10)" into cell A15. Put the second group of bold numbers into cell A17 by entering "=MID(A12,38,8)" into said cell. (both examples with out the " marks. IcI |
#7
|
|||
|
Quote:
Thanks ICI ... Below is the code I came up with and works like a charm. PHP Code:
|
#8
|
||
|
gj dd
__________________
04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why do I got that line on my SIG | dave61 | General Chat | 8 | 08-11-2009 02:47 PM |
things not to do on-line | Hellfighter | General Chat | 14 | 03-29-2007 09:27 PM |
New movie line up. | JakeTKD | General Chat | 16 | 01-22-2006 01:26 PM |
The Best comeback line ever:)!!!! | BADDOG | Humor & Jokes | 11 | 12-09-2005 10:46 AM |
Playing On-Line | rich887210 | Delta Force | 0 | 02-16-2003 03:08 PM |