Craig92604
Well-known Member
- Joined
- Nov 7, 2002
- Messages
- 505
I put together this formula to pull the state from a cell that contains City, State and Zip
=MID(B19,FIND(" ",B19,1),3)
Works fine for when the City is One word but when it is two words it doesn't work.
This formula works if there is two word city=MID(B19,FIND(" ",B19,FIND(" ",B19,C19+1)),3)
What I am looking for is a formula to count the number of spaces in a cell. Then I could build a nested if statment to handle cells with both 1 and two word cities.
PS- There is not a comma after the city
=MID(B19,FIND(" ",B19,1),3)
Works fine for when the City is One word but when it is two words it doesn't work.
This formula works if there is two word city=MID(B19,FIND(" ",B19,FIND(" ",B19,C19+1)),3)
What I am looking for is a formula to count the number of spaces in a cell. Then I could build a nested if statment to handle cells with both 1 and two word cities.
PS- There is not a comma after the city