Hi,
Need help with parsing address fields. I have a situation where the addresses are in two columns(Address 1 and Address 2). Some rows contain the branch names in the address fields(please see below). Wanted to see if there is a way to use regular expressions to see if address line 1 contains a number. If not, then check line 2. If address line 2 starts with a number and line one doesn't contain one, then replace line 1 with line 2. Thanks in advance!
Address | Address Line 2 |
ABC WEALTH ADVICE CENTER INC | 500 HARBOR BOULEVARD |
250 MUNOZ RIVERA AVENUE, PH FL |
Solved! Go to Solution.
Use a formula tool with Output Column set to Address and the following formula: IF REGEX_Match([Address], ".*\d.*") = -1 THEN [Address] ELSEIF REGEX_Match([Address Line 2], ".*\d.*") = -1 THEN [Address Line 2] ELSE [Address] ENDIF
This will see if the Address field has a number in it, if yes, keep what is in Address otherwise look at Address Line 2 to see if it has a number in it, if yes, replace Address with Address Line 2. If neither have a number, then keep as is.
Thanks much for the quick response! Awesome, it just worked the way I wanted. Thank you so much for your inputs on this:) @T_Willins