I need to ensure that a cell starts with a string (one of two, at the moment), followed by a colon and then whatever else (not blank).
ie:
IP Address:1.2.3.4
FQDN:a.b.c.d
So, I need to ensure that either of those strings plus ‘:’ starts the cell. There could be spacing around the ‘:’.
I’m not sure what you mean by “ensure”…
This will check the cell to see if it has either of the two starting values in an Excel function:
That doesn’t take into account spacing around the colon though. For that, it’s Regular Expressions, which I am not very good with.
— Take the code from Tushar Mehta’s site: http://www.tmehta.com/regexp/add_code.htm
Then, use an Excel function like this:
or you could merge these into a single formula like this: