Thread: Mid
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike Archer[_2_] Mike Archer[_2_] is offline
external usenet poster
 
Posts: 8
Default Mid

Hello.
I need to set a variable to the be all of the ending alpha
characters in a string.

The following will work for part numbers ending in 1 alpha
character:

MyVar = Mid(PartNumber, Len(PartNumber), 1)

If PartNumber = "0500531-1A", I need MyVar to be "A"
(easy). But if PartNumber = "0500531-1AB", I need MyVar
to be "AB". Does InStr have the ability to look for
alpha, or will I need a subroutine?

TIA,
Mike