Excel Formula Help

Copper Contributor

 

Hello! 

 

I'm reaching out because I'm not very familiar with excel formulas. What I'm looking for is to have a City Column and County Column. For example, if I put a city such as San Francisco (Column H), I want the County Column (Column I) to populate with the set County Code. There are roughly 5+ County Codes that will be correlating with a numerous number of cities in California. The data in which I want this information to be pulled from is in a secondary tab. So, essentially when I input the city in the City Column (Column H) I need the County Column (Column I) to auto fill by pulling the associated data from the second tab. Sorry for any redundancies and thanks for the help!! 

2 Replies

@vjnaicker 

 

What you're describing sounds exactly like what you need is the VLOOKUP function. If you'd upload a sample of your file, I or somebody else could create the formula for you. But perhaps you'd rather do it yourself. It's not hard. Use the Excel Help...or search on Google for how to use that function.

 

It's allegedly something like the third most popular function in all of Excel...well worth becoming acquainted with.

 

Just make sure that if you do post a sample of your file, that it not include any private or confidential info.

Hey there! Thanks for the insight. I was finally able to get it to work. The formula that I ended up using was =IFNA(VLOOKUP($H2,'City-County'!$A:$B,2,FALSE),""). That seemed to do what I was looking for. @mathetes