Make a pop up message if about to call area codes excluding specified
Here's a working macro with explanation in comments
(Click to enlarge)

Note

Log events write to the log which can be accessed from the home screen of the app and are useful to check errors.

Screenshot shows the local variable value, which is also useful in troubleshooting.

Your macro had matching condition excludes which is wrong, it needs to be != (not equal to).

In the Text Manipulation action, the output should be saved to the variable A


Edit : The answer above is in response to the previous version of the question