I'm looking to do the equivalent of VLOOKUP in excel to convert state codes into state names within keyboard maestro.
NY -> New York
CA -> California
etc.
How would I do this?
I'm looking to do the equivalent of VLOOKUP in excel to convert state codes into state names within keyboard maestro.
NY -> New York
CA -> California
etc.
How would I do this?
Yep, this can be easily done using RegEx.
See this example which you should be able to adapt for your use case:
Here's my industrial strength solution for states and their abbreviations. I use Associated Press state abbreviations as well as postal abbreviations so each state has two abbreviations in addition to its full name.
This macro substitutes the selection for any of the three. F2 substitutes the full name, Control-F2 substitutes the AP abbreviation and Option-F2 substitutes the two-character postal abbreviation.
States- Abbreviations.kmmacros (9.9 KB)
Just expanded on this solution with one that includes month names, abbreviations and numeric representations:
Thanks to @ComplexPoint, this version corrects two issues with the list of abbreviations (a missing DC for District of Columbia and a space for a tab between Aug. and 08):
Abbreviations: States, Months Macro (v9.0.6)