ExcelBrent
New Member
- Joined
- Oct 17, 2022
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hey, I am looking for some guidance on how I might achieve the following:
I have a column (column H) of full addresses, for example:
1234 SW 80th Pl, Miami, FL 33331
On another sheet, I have a list of COUNTIES in column A, and CITY in column B.
I am needing to search the contents of the full address for the CITY and return the COUNTY that the city is located in.
I am trying to end up with a column that has the COUNTY associated with the address, so I can copy and paste the column values into a "County" column on the same sheet with the addresses.
I can find it with:
However, this results in a full column of "FALSE" except for the located CITY. The below image is the result using the example address above. Column C is all FALSE except for the row 520, result is "Miami-Dade" which is correct; CITY in address = Miami and COUNTY = Miami-Dade.
Then to get the next address I would have to go horizontal to the next column which then I would search the address in Sheet2!$H$3.
I feel like there is a better approach. Any assistance is appreciated!
I have a column (column H) of full addresses, for example:
1234 SW 80th Pl, Miami, FL 33331
On another sheet, I have a list of COUNTIES in column A, and CITY in column B.
COUNTY | CITY | |
| Acacia Villas | |
Alachua | Alachua | |
Orange | Alafaya | |
Jackson | Alford | |
Santa Rosa | Allentown |
I am needing to search the contents of the full address for the CITY and return the COUNTY that the city is located in.
I am trying to end up with a column that has the COUNTY associated with the address, so I can copy and paste the column values into a "County" column on the same sheet with the addresses.
I can find it with:
Excel Formula:
=IF(ISNUMBER(SEARCH(B520,Sheet2!$H$2)),A520,"FALSE")
However, this results in a full column of "FALSE" except for the located CITY. The below image is the result using the example address above. Column C is all FALSE except for the row 520, result is "Miami-Dade" which is correct; CITY in address = Miami and COUNTY = Miami-Dade.
Then to get the next address I would have to go horizontal to the next column which then I would search the address in Sheet2!$H$3.
I feel like there is a better approach. Any assistance is appreciated!