I'm trying to develop a macro that will be able to handle contact/address information in a variety of formats, to produce a cleaned, standardized list of said information. To be specific, I have spreadsheets that contain fields for first name, last name, address 1, address 2 (e.g., apt #, lot#), city, state, and ZIP code. I'd like to create a macro that will:
Assuming I start with a worksheet called "Original" that contains hundreds of cases and a separate, blank worksheet called "Cleaned":
1. Within worksheet "Original, apply "PROPER" capitalization rules to first name (column A), last name (column B), address 1 (column C), address 2 (column D), and city (column E)
2. Within worksheet "Original, apply "UPPER" capitalization rules to state (column F)
3. Within worksheet "Original, make sure that ZIP codes (column G) are in text format and that they include 5 digits (format "00000")
4. Concatenate first and last name into column A of the "Cleaned" worksheet
5. Add address 1 to column B in the "Cleaned" worksheet
6. Add address 2 to column C in the "Cleaned" worksheet
6. Concatenate city and state in column D of the "Cleaned" worksheet
7. Move ZIP code from original worksheet to column E of the "Cleaned" worksheet
Hope this makes sense.
Bookmarks