Forum Discussion

RandyD79's avatar
RandyD79
Copper Contributor
Sep 26, 2019
Solved

Formulas to add info to cell based on a WORD in another cell

I'm looking to get a cell to add information based on another cell, and can't seem to get it...   Basically, what I want to do is have a cell look at another, and based on a specific word, add spec...
  • Subodh_Tiwari_sktneer's avatar
    Sep 26, 2019

    RandyD79 

    So if all you need is to populate the column F based on province entered in column A, you may try something like this...

     

    In F2

    =IF(A2="","",IFERROR(VLOOKUP(A2,Subnet,2,0),""))

     

    I have inserted a new sheet called "Lookup" where you can list all the provinces and their subnet.

    I have also created a dynamic Named Range called "Subnet" which is used in the formula above.

    You may add more provinces and their details on Lookup Sheet and your formula will be updated automatically as per the province you enter in column A if that province exists on Lookup Sheet.

     

    So if A2 is AB, the formula will return 192.102. in F2.

     

    But if you want F2 to return 192.102.1.0 in F2 as you showed in the cell F8 (green cell), you may tweak the formula as...

    =IF(A8="","",IFERROR(VLOOKUP(A8,Subnet,2,0)&"1.0",""))

     

Resources