Link to home
Start Free TrialLog in
Avatar of garyrobbins
garyrobbinsFlag for United States of America

asked on

Access Querry only part of a string

I am trying to build a function in access that would only select the last User Name.  Seperate by a ²

So this
TTRA²TTRA²TTRA
OCRJMR²OCRJMR²GYEYE55

Would return
TTRA
GYEYE55
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Try this:
Function EE(strInput As String) As String
    Dim arr() As String
    arr = Split(strInput, "²")
    EE = arr(UBound(arr))
End Function

Open in new window

Avatar of garyrobbins

ASKER

I am sorry Function might not be the right term.  I need something like whats below not as part of a macro.

Right([Columnt Name],8)

The user names is not always the same length which is what is throwing me off.
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try this

mid([Column Name],  InStrRev([Column Name], "²")+1)
Perfect!!!! Thank you some much!