VBA to insert a timestamp when a value changes in another cell

ashtar123

New Member
Joined
Aug 12, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi Excel experts,

I would highly appreciate if someone could help me figure out a VBA to insert a date and time stamp in a cell based on the value change from another cell.

Please note this is not a request to ask when a data entry action has been performed to make the change.

It is a request regarding when selecting a certain value from a data validation dropdown list to change the value in another cell based on IF function, so a date and time stamp can automatically populate to mark the change.

Example from the attached sheet:

3 different men named A, B and C.

A weighs 180 lbs., B weighs 200 lbs., and C weighs 210 lbs.

By default, Cell B3's value is always A. So Cell C3's value is always 180.

Changing the value in Cell B3 from A to B, can ONLY be done by picking "B" from a dropdown list in Cell B3.

This is to say, NO MANUAL DATA ENTERING/ CHANGING can be done to make this value change from A to B.

In this case, how would I be able use VBA to insert a date and time stamp in Cell D3, when every time a new value in Cell B3 has been SELECTED/ PICKED (NOT ENTERED) from the dropdown list?

For instance, currently Cell B3 is "A". I picked "B" in Cell B3's dropdown list on 08/12/22, 12:00:00pm.

What would be a VBA to mark this stamp automatically in Cell D3?

Again, your help is GREATLY appreciated!

Thank you so much!!
 

Attachments

  • Example.JPG
    Example.JPG
    40.6 KB · Views: 10

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
The formula in C3 is "=IF(B3="C",210,IF(B3="B",200,IF(B3="A",180)))".

In B3 there is a dropdown list of "A", "B", "C".

Just wanted to have a timestamp in D3, whenever I pick A or B or C in Cell B3 then Cell C3 changes to 180, 200 and 210.

The timestamp should mark the time when it changes from 180 to 200, 200 to 210 etc.

Thank you so much!!!!
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: VBA to insert a timestamp when a value changes
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,186
Members
449,071
Latest member
cdnMech

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