Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() David, i would NOT use the FIND worksheetfunction for this. it's many times slower than instr. WHY then len(s)?? - it's optional for vba's mid function. - it should be len(s) - iPos Sub USEinstrNOTfind() Dim s$, r$, n&, m&, t(1) m = 100000 s = "Find the line" & vbLf & "feed" t(0) = Timer For n = 1 To m r = Mid$(s, Application.Find(vbLf, s) + 1) Next t(0) = Format(Timer - t(0), "0.00") t(1) = Timer For n = 1 To m r = Mid$(s, InStr(1, s, vbLf) + 1) Next t(1) = Format(Timer - t(1), "0.00") MsgBox Join(t, vbLf) End Sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam davidm wrote : Function SnipString(rng) x = Mid(rng, Application.Find(Chr(10), rng) + 1, Len(rng)) Loc = x End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
There is no row at position 0 | Excel Discussion (Misc queries) | |||
Look up a value which position changes. | Excel Discussion (Misc queries) | |||
How can I fix the position of a row | Excel Discussion (Misc queries) | |||
.position | Charts and Charting in Excel | |||
Tab Position | Excel Programming |