Thread: Partial String
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rowan Drummond
 
Posts: n/a
Default Partial String

Try:

Dim myStr As String
Dim myNewStr As String
myStr = "67890 / 1111"
myNewStr = Right(myStr, 4)
Debug.Print myNewStr

Hope this helps
Rowan

mjack003 wrote:
Howdy,

How would I go about deleting entire strings, of variable length,
saving only the last four digits of each? Ex: myStr = 67890 / 1111 and
I want myNEWStr = 1111. I need to automate this in VBA.

Appreciate the help,

Mjack