Static Date Change based on Drop Down Selection

snaplink22

Board Regular
Joined
Jul 6, 2018
Messages
129
Hello,

I am creating a basic order tracking spreadsheet where I would like the date in one cell to change based off of the selection made in the drop down menu of another cell. I don't want the date to update automatically though and have it remain static. The trick is that the date is not just today's date, but the date the status was changed minus a number of days, here's an example:

A1 - Drop down menu
B1 - Equals the date the cell A1 was changed, plus ten days

I'm sure it's a simple formula that I'm missing. Here's what I've come up with so far =today()+10. This takes the current date and adds ten days, but it keeps updating the date after every day has ended.
 
Sorry, never worked with macros before. Is this what I want to type in:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Set rng=Target.Parent.Range("A1")) Is Nothing Then Exit Sub

Nope, just change this one line, and leave everything else the way it is:

Set rng = Target.Parent.Range("A1")

to:

Set rng = Target.Parent.Range("A1:A100")

Or whatever the ending row is. If it changes, then you can add a variable to get that.

Code:
Dim lr as long
lr = Cells(Rows.Count,"A").End(xlUp).Row

Set rng = Target.Parent.Range("A1:A" & lr)
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Smitty,

Never mind my last question. I was able to work out what you were trying to assist me with with that macro. Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,215,201
Messages
6,123,617
Members
449,109
Latest member
Sebas8956

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