Can I copy values entered in a cell into another sheet?

nawaab007

New Member
Joined
May 7, 2011
Messages
19
Hi,

I have a sheet whereby values are entered in a cell in a sheet. I mean values in a cell are modified by the user. What I want is to store all the values that have been entered in that cell to be copied in another sheet so as to keep record of the historical values. Also could this sheet be made hidden?

Regards,
Nawaab007
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Oops I think I found the issue. The value is being changed by the formula. Would that be the show stopper?
 
Upvote 0
Yes... Formulas changing the cell value won't trigger than code. What is the formula/code that updates the cell value?
 
Upvote 0
Are C19:C24 updated via User Input then??



Code:
If Intersect(Target, Range("C19:C34")) Is Nothing Then 
....
myStr = ActiveSheet.Range("H33").Value
 
Upvote 0
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myStr As String
Dim myDest As Worksheet
Set myDest = Sheet3 'Change Sheet3 to your HIDDEN WORKSHEET.
If Intersect(Target, Range("C19:C24")) Is Nothing Then 'Change "A1:A1" to your cell range that you want to track changes for.
Exit Sub
End If
myStr = ActiveSheet.Range("H33").Value
myDest.Range("A10000").End(xlUp).Offset(1, 0).Value = myStr 'The code will start on cell A10000 and then move up to the last cell with an entry, and will add the new entry directly below. Change 10000 to a number that is greater than you would ever expect to track changes for. Also change A to the column you want to track changes in.

End Sub
 
Upvote 0
I get the logic what you are trying to implement. But I cannot see a new entry whenever I change values in C19:C24. Could you pls again share the worksheet that incorporates change in value through a formula.
 
Upvote 0
Here:

http://iput.it/623083

Cell H33 was not correct. Your formula "=Average(C19:C24)" was located in cell E20.

So the correct code looks like this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myStr As String
Dim myDest As Worksheet
Set myDest = Worksheets("Second")
If Intersect(Target, Range("C19:C24")) Is Nothing Then 'Change "A1:A1" to your cell range that you want to track changes for.
Exit Sub
End If
myStr = ActiveSheet.Range("E20").Value
myDest.Range("A10000").End(xlUp).Offset(1, 0).Value = myStr 'The code will start on cell A10000 and then move up to the last cell with an entry, and will add the new entry directly below. Change 10000 to a number that is greater than you would ever expect to track changes for. Also change A to the column you want to track changes in.
End Sub

If you change a value in C19:C24, the list updates with the tracked changes on Sheet2. I left the history it generated when I plugged in different values to C19:C24 for you to see.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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