Hi All,
I've been searching online for this solution for a while, and while there are a lot of discussions out there, none of them seem to fit exactly what I'm trying to do. I'm an Excel 2010 user, and have only used VBA for the most basic functions (ie, I copy and paste VBA language!).
I'm looking to insert a timestamp in a single cell when new data is pasted into another cell. All the other solutions I've found on the web use column references and offsets. Since I don't know how to write VBA, I can'te adjust the language in the other solutions to use a cell reference instead, and so I'm looking for the most basic structure of this function. As long as the VBA is set up for single cells, I can paste in the formula into VBA and simply change the cell references if need be. In addition, some of the other solutions I've found didn't work when new data was pasted-value over the target cell, only when I manually typed new data into the target cell.
Ex:
Each week I will paste-value new data into A1:D4, and would like G1 to automatically update with a time-stamp. It's okay to reference a single cell from the A1:D4 range, C1 in the illustration below, because that column is guaranteed to have numbers that will change each week.
How do I set up VBA to accomplish this? Thank you, -Rich
[TABLE="class: grid, width: 150, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD]3 Feb 2:15:35
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]3
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I've been searching online for this solution for a while, and while there are a lot of discussions out there, none of them seem to fit exactly what I'm trying to do. I'm an Excel 2010 user, and have only used VBA for the most basic functions (ie, I copy and paste VBA language!).
I'm looking to insert a timestamp in a single cell when new data is pasted into another cell. All the other solutions I've found on the web use column references and offsets. Since I don't know how to write VBA, I can'te adjust the language in the other solutions to use a cell reference instead, and so I'm looking for the most basic structure of this function. As long as the VBA is set up for single cells, I can paste in the formula into VBA and simply change the cell references if need be. In addition, some of the other solutions I've found didn't work when new data was pasted-value over the target cell, only when I manually typed new data into the target cell.
Ex:
Each week I will paste-value new data into A1:D4, and would like G1 to automatically update with a time-stamp. It's okay to reference a single cell from the A1:D4 range, C1 in the illustration below, because that column is guaranteed to have numbers that will change each week.
How do I set up VBA to accomplish this? Thank you, -Rich
[TABLE="class: grid, width: 150, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD]3 Feb 2:15:35
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]3
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD]#
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]