Created
January 13, 2018 08:07
-
-
Save alana314/16d58b67b0809cc0bac6a212e20bffe2 to your computer and use it in GitHub Desktop.
Google Sheets/Excel Formula for formatting addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For cells: | |
C3: First Name 1 | |
D3: Last Name 1 | |
E3: First Name 2 | |
F3: Last Name 2 | |
H3: Mailing Address 1 | |
I3: Mailing Address 2 (Optional) | |
J3: City | |
K3: State | |
(L3: Country unused) | |
M3: Zip | |
Name Formatting: | |
If firstname 2 doesn't exist: | |
Firstname1 Lastname1 | |
If lastname 2 = lastname 1: | |
Firstname1 & Firstname2 Lastname1 | |
If lastname 2 != lastname 1: | |
Firstname1 Lastname1 & Firstname2 Lastname2 | |
Address Formatting: | |
Mailing Address 1 | |
(if Address 2 exists): Mailing Address 2 | |
City, State Zip | |
Formula: | |
=CONCATENATE(C3, if(D3=F3, " ", CONCATENATE(" ",D3, " ")), if(E3<>"", CONCATENATE("&", CONCATENATE(" ", E3), " ", F3), ""), CHAR(10), H3, CHAR(10), if(I3<>"", CONCATENATE(I3, CHAR(10)), ""), J3, " ", K3, " ", M3) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment