Change between data validation listbox or formular in the same cell

bosstec

New Member
Joined
Jun 23, 2011
Messages
12
Hi,
I have the following problem:
Cell A1 have data validation listbox, where I can choose between values ("A", "B" or "C") from a named list called "List1".

Cell B1 contain normally a formular [=sum(D1:E1)], but when I chose the value "C" from the list in A1, I need B1 to be a data validation listbox as well, with another named list called "List2".
When A1 change to "A" or "B" again, I need the formular from before in B1.

In other words:
If A1 = "C" Then B1.DataValidation.List "=List2" Else B1="=sum(D1:E1)"

I was thinking the trigger should be Worksheet_Change

Thanks in advance
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,520
Messages
6,179,267
Members
452,902
Latest member
Knuddeluff

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top