S Oberlander
Board Regular
- Joined
- Nov 25, 2020
- Messages
- 147
- Office Version
- 365
- Platform
- Windows
I have a macro that saves my excel file and names it based on the selected cell, however very often there are characters that cannot be part of a filename. I would like to simply remove those characters and proceed with saving. There may be slashes and/or colons and other special characters in the selected cell, however I do not know its location as it varies.
How can I do this?
Random example:
The selected cell contains "Sample 1/1/22: Ready"
I want my filename to contain "Sample 1122 Ready"
or perhaps replace special characters with underscore so I get "Sample 1_1_22_ Ready".
How can I do this?
Random example:
The selected cell contains "Sample 1/1/22: Ready"
I want my filename to contain "Sample 1122 Ready"
or perhaps replace special characters with underscore so I get "Sample 1_1_22_ Ready".