Reputation: 1
New excel user looking for a solution to a character limit issue with my ifelse() function. I am creating a database of people's home towns and their corresponding districts/counties/states. I have written a function that allows the district to come up automatically when the town is entered, by writing in the 'District' column:
IF([@Town] = "town1", "state1", "") & IF([@Town] = "town2", "state2", "")
With [@Town] being the town column. However, as I have hundreds of towns and assosiated districts I have now reached the limit for charters.
How would I resolve this issue? Is it a case of the wrong approach making this formula far too complicated than it needs to be? Is there a work around?
Cheers, Joe
Upvotes: 0
Views: 179
Reputation: 152475
Create a lookup table of all your towns and their respective state.
Then use VLOOKUP:
=VLOOKUP([@Town], G:H,2,FALSE)
Upvotes: 1