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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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