For some reason I can't get this to work. Any help is appreciated
AccountSSName1 = John Smith DOD [1234-1234]
Out of that string I want to:
#1 - replace "[" & "]" with "(" & ")" so I can later name a tab of the worksheet with this value
#2 - just keep the 1234-1234
Keep in mind the value in AccountSSName1 will always be XXXXXXXXXX [1234-1234] whereas XXXXXXXXXX can be any length. In other words, change the "[" & "]" to "(" & ")" and remove anyhting past 9 characters from the right.
Here is what I have that I can't get to work. I think I am really close.
=RIGHT((SUBSTITUTE(SUBSTITUTE(AccountSSName1,"[",""),"]",""),LEN(SUBSTITUTE(SUBSTITUTE(AccountSSName1,"[",""),"]",""))),-9)
Cheers,
Guy
AccountSSName1 = John Smith DOD [1234-1234]
Out of that string I want to:
#1 - replace "[" & "]" with "(" & ")" so I can later name a tab of the worksheet with this value
#2 - just keep the 1234-1234
Keep in mind the value in AccountSSName1 will always be XXXXXXXXXX [1234-1234] whereas XXXXXXXXXX can be any length. In other words, change the "[" & "]" to "(" & ")" and remove anyhting past 9 characters from the right.
Here is what I have that I can't get to work. I think I am really close.
=RIGHT((SUBSTITUTE(SUBSTITUTE(AccountSSName1,"[",""),"]",""),LEN(SUBSTITUTE(SUBSTITUTE(AccountSSName1,"[",""),"]",""))),-9)
Cheers,
Guy