I use excel a lot to structure finite state machines. As such I often format cells so that I can cut and past entire sections into my C source directly.
Currently I’m having to preprocess one of my code blocks so that I can replace “-” with “_” in my identifiers. Example, in cell I might have
#define Some-preprocessor-name
But I’d like to have:
#define SOME_PREPROCESSOR_NAME
The upper case bit is covered by UPPER(), but the locations of the hyphens is arbitrary as is the number I’d expect to find. Suggestions?
You need Substitute().
eg
Substitute(A1, “-“, “_”)