I have a file that exports about 76 columns. Some of the columns have information formatted in the same column, but I’d like to maintain the information before sending it to Airtable.
As you can see below, in a single column the addresses include the City, State ZIP together, and sometimes include the extra 4 digits of the ZIP.
So I would like to add on the following columns so it shows separately and not including the 4 digits
Start by importing your source data. Use a “Split column” step to target your Owner City State Zip column. You can split on a comma-space , . Your cities should now be separated.
Your state and zip data should be in a column called Owner City State Zip (1). Use another “Split column” step to target that column and split on every space. Your states and zips should now be separated too.
To remove the last 4 digits in your zip code, add a “Use regex” step to target your Owner City State Zip (2) column. Use the expression -\d* to find the last 4 digits and replace them with a blank value.
That regex expression will remove any digits in your zip after the dash. So if it’s a 9-digit zip, it will remove those digits. If it’s a 5 digit zip, no digits will be removed.