Track changes and keep records when group of cells change value

Dimitris31

New Member
Joined
Oct 9, 2013
Messages
1
Hi to all,

I want to say from the start that I am new and I don't have any exprerience to VBA language!.
However I know clearly what I want to do.

THE GOAL:
I am using EXCEL 2003 and I want to record the values from a group of cells when they change, at a different sheet, let's say LOG_ELEV.
I have searched to the forum for similar questions and I have decided to use the following code which is working perfectly only for one cell.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address(False, False) = "G11" Then
With Sheets("LOG_ELEV").Range("A" & Rows.Count).End(xlUp).Offset(1)
.Value = Target
End With
End If

When I change the value of G11 then this value is recorded to the column A of the "LOG_ELEV" sheet at a descending chronologically order.
If I want to add a second cell I would add new code (rewriting the old one) like this:

If Target.Address(False, False) = "G12" Then
With Sheets("LOG_ELEV").Range("B" & Rows.Count).End(xlUp).Offset(1)
.Value = Target
End With
End If

And if I wanted to apply this for 500 cells I would rewrite the code for 500 times?:eeek:

The logic is that the group of cells that I want to keep in track their values change, are all from the column G and goes like this:

G01 records its value to the column A of "LOG_ELEV" sheet.
G02 goes to column B.... and so on...
After a certain cells I may want to change the log sheet and start over:
G22 goes to column A
G23 goes to column B ...and son on...

Is there any way of re-programming it and easily apply it for the certain group of cells?
Thank you for your time and patience!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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