Easy Way to Substitute Invalid Filename Characters?

Is there a concise expression to substitute invalid characters, without having to use lots of nested SUBSTITUTE functions?

Lots of characters cause problems when creating file names, such as : \ ? < > ’ / * etc

I want to substitute all these and more with - (dash) without having to do lots of nested substitutes?

Any ideas?

I don’t think so.

1 Like

If you’re using Google Sheets, you could use REGEXREPLACE(). I dunno if Excel has that function.

1 Like