Forum Discussion

juliejo's avatar
juliejo
Copper Contributor
Jun 05, 2021
Solved

How to return a specific value based on a combo box

Hello! I have an activex combo box linked to a list of services. I need to create a formula in an adjacent cell that reads the value in the combo box and fills in the appropriate price.   For examp...
  • HansVogelaar's avatar
    Jun 05, 2021

    juliejo 

     

    1. Set the LinkedCell property of the combo box to the address of a cell on the worksheet, for example to the cell under the combo box. In the example below, this is A2. When you select an item from the dropdown list, it will be entered in the linked cell.
    2. Create a list with the services in the first column, and the corresponding prices in the second column. You can use the first column as the ListFillRange of the combo box. In the example, it is E2:E6.
    3. In the cell where you want the price, enter a VLOOKUP formula (in combination with IFERROR):  =IFERROR(VLOOKUP(A2,$E$2:$F$6,2,FALSE),"")

Resources