Skip to main content
In this example, I will only write a script as a macro is falling a bit short when you need more specific validation. Let’s use the organization number validation example and build upon that. We want it to only contain numbers, and it has to be 9 digits. The code we will write will be something like this:
Now we will first check if it is empty, then check if it consists of 9 digits, the script can give two different messages based on which case it hits.