FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,368
- Office Version
- 365
- 2016
- Platform
- Windows
I have a sting and the code below works find to return the name. I just don't understand what the numbers in the parenthesis are doing?
DEMOGRAPHICS NAME: Donald J. Duck BANK: 451CS
DEMOGRAPHICS NAME: Donald J. Duck BANK: 451CS
Code:
Sub trythis()
Dim MyText As String
MyText = Trim(Split(Split(Range("A1"), "NAME: ")(1), "BANK:")(0))
Range("A5").Value = MyText
End Sub