Re: Select specific text in cell



The above as a "one-liner" in deference to Rick:

LOL

============================================
Function fn(str As String) As String
fn = Trim(Split(Split(str, "\")(UBound(Split _
(str, "\"))), "-")(LBound(Split(Split _
(str, "\")(UBound(Split(str, "\"))), "-"))))
End Function
==========================================

The LBound for a Split is always 0 no matter what the Option Base is set to. Using this fact, your one-liner can be simplified considerably...

Function fn(str As String) As String
fn = Trim(Split(Split(str, "\")(UBound(Split(str, "\"))), "-")(0))
End Function

Rick

.



Relevant Pages

  • Re: What makes a good player?
    ... I never got the thing up to a volume that really let the whole amp do ... That Fender didn't help my playing at all. ... No matter which guitar I use, it's a matter of mostly my playing.. ... The guys strat with each string at a weird height to make up for the ...
    (alt.guitar.beginner)
  • Why strings are required to halt collapse (was: black holes and singularities)
    ... Which is why I resist the idea of matter confined to a thin ... > spherical shell, and think only of a radiation shell. ... I have been very skeptical of string theory, ... radiation] at radial position r and proper radial extension dl. ...
    (sci.physics.relativity)
  • Re: Why strings are required to halt collapse (was: black holes and singularities)
    ... Which is why I resist the idea of matter confined to a thin ... >> side with the idea it radiation is excluded from discussions of matter. ... > expressed in a string context. ... modify our low energy equations, ...
    (sci.physics.relativity)
  • RE: combo box...then multi select list box
    ... it does not matter where the code is within the module. ... "Kevin" wrote: ... >> Private Function BuildWhereCondition(strControl As String) As String ... >>> the selections in each box, then click a command button for various available ...
    (microsoft.public.access.forms)
  • Re: String concatenation function, request for comments.
    ... > a matter of personal taste about which reasonable people can ... The function is useful only if an extremly efficient multiple strcat() is ... If the string is designed for human consumption then normally a few ... microseconds of CPU time doesn't matter, given that the user will spend a ...
    (comp.lang.c)

Loading