# Drop Down List Formula

#### Rubber Beaked Woodpecker

##### Board Regular
In T145 I have the following formula: =INDEX(AC4:AE141,MATCH(U145,AC4:AC141,FALSE),3)

This formula calculates the days possible commission payments.

I would like the option of overwriting the commission payment in cell T145 by using a drop down list containing the test "X" but if I decide to remove the X the cell reverts back to the formula =INDEX(AC4:AE141,MATCH(U145,AC4:AC141,FALSE),3).

At present if the X is selected the formula is lost.

Hope this makes sense and any help would be greatly appreciated

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

#### jasonb75

##### Well-known Member
The selected value of the dropdown is a constant, you can have either a constant or a formula in a cell, not both.

The only alternative would be to replace the formula with vba when the content of the cell is deleted, something like this in the worksheet module (untested)
VBA Code:
``````Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 And Target.Address(0, 0) = "T145" Then
If Target.Value = "" Then
Target.Formula = "=INDEX(AC4:AE141,MATCH(U145,AC4:AC141,FALSE),3)"
End If
End If
End Sub``````

#### Rubber Beaked Woodpecker

##### Board Regular
The selected value of the dropdown is a constant, you can have either a constant or a formula in a cell, not both.

The only alternative would be to replace the formula with vba when the content of the cell is deleted, something like this in the worksheet module (untested)
VBA Code:
``````Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 And Target.Address(0, 0) = "T145" Then
If Target.Value = "" Then
Target.Formula = "=INDEX(AC4:AE141,MATCH(U145,AC4:AC141,FALSE),3)"
End If
End If
End Sub``````
Hi thanks.
Unfortunately I am unable to use VBA as the spreadsheet is mainly used via the Excel mobile app. I guess my request is not possible.
Thank you for the VBA solution

Replies
3
Views
89
Replies
5
Views
98
Replies
7
Views
64
Replies
5
Views
38
Replies
13
Views
228

1,129,528
Messages
5,636,847
Members
416,945
Latest member
Himu

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back