Auto populating the date when a value is changed

Copper Contributor

Hoping someone can help. I have a excel sheet where column x has a drop down option of listing "Open" or "Closed." Whenever a new row is added, I need to mark it as open but eventually once the project is finished, I need to mark it as "Closed" using the drop down in column x. I have another column, D, that lists the closed date. Is it possible to have the date automatically populate in column d when column x is marked as "Closed"? I've found codes that will populate a date when a value is entered in the cell but none where the date is populated when the value is changed.

3 Replies

@corh1234 

Is this what you want to do?

@OliverScheurich 

 

Yes, that's it exactly!!! If I have a table and I add more than 25 rows, will it still work? Thanks so much!

@corh1234 

Set rngBereich = Range("W2:W25")

 

It works depending on the range in the VBA code. The example works for rows 2 to 25. But you can easily change the range to e.g. "W2:W200" and it works for rows 2 to 200.