VBA to update default drop down option

franswa3434

Board Regular
Joined
Sep 16, 2014
Messages
69
Hey everyone,

I need to somehow create a formula or VBA (or any other option) to default a drop down in a cell, based upon the value of another cell, but still allow the user to select a different option. I am using a VBA to set it to the default, and can update the drop down, but it will not retain the new (non-default option) if I switch tabs or close out of the worksheet.

For example, if A1 <> "", then B2 (which has a Yes/No drop down) needs to default to "Yes", but yet needs to be able to be changed to "No" without automatically switching back if I go to a different tab or close out of the worksheet.


I tried using a VBA formula which stated if B2="No" then B2="No", elseif A1<>"" then B2="Yes", but it did not solve my issue.

Any thoughts?
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,215,731
Messages
6,126,535
Members
449,316
Latest member
sravya

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