Forum Discussion

AWillis88's avatar
AWillis88
Copper Contributor
Apr 09, 2024

Adding words based off other cell

Trying to see if i can auto generate a word based off another cell. Example, spread sheet has a county name. I added a column next to it in hopes to find a formula that would auto generate the Division that County is in based off the county name. I.e. 20 counties, 5 divisions. In a single cell, can it be formulated to recognize the county and auto generate the division.

 

 

    • AWillis88's avatar
      AWillis88
      Copper Contributor
      Hans, Example would be, i am trying to match the division directly to the county based off the county name. I.E. if it says Mackenzie, it will autofill Archview as the Division. If it says Berkley it will autofill Gateway. So on.
      • HansVogelaar's avatar
        HansVogelaar
        MVP

        AWillis88 

        Create a range with two columns: county in the first column, an corresponding division in the second column.

        Select the range and name it (for example) Counties. (Formulas tab of the ribbon > Define Name). Or convert the range to a table and name this table Counties.

         

        Let's say you have counties in your data in C2 and down.

        In a cell in row 2, enter the formula

        =IFERROR(VLOOKUP(C2, Counties, 2, FALSE), "")

        Fill down.

         

Resources