Tracking days and values

khalil

Board Regular
Joined
Jun 2, 2011
Messages
100
hi all

please help,

cell A1 always has a number changes once every day ,( only Cell A1)

i want to track that number with that date, i come back to it any time,

thanks
:)
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Need a little more info here.

cell A1 always has a number changes once every day (only Cell A1).

The value in A1, how does it get changed everyday?

i want to track that number with that date, i come back to it any time.

Does this mean you simple want to track the number and what date it is associated with, but no other datat? Do you want a list stored on another sheet with the number and date?
 
Upvote 0
thanks for the reply,

it comes from another cell from another tap, paste special link

thanks
:)
 
Upvote 0
Okay then try this...

Right click sheet tab >> view code >> paste code on right side of screen

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Rng As Range
    Dim oldvalue As Long
    oldvalue = Range("A1")
    Dim LR As Long
    LR = Range("F" & Rows.Count).End(xlUp).Row + 1
    Set Rng = Target.Parent.Range("A1")
    If Target.Count > 1 Then Exit Sub
    If Intersect(Target, Rng) Is Nothing Then Exit Sub
    Range("F" & LR) = oldvalue
    Range("G" & LR) = Date
End Sub

Everytime you paste something in A1, columns F/G will recieve the old number and a date.
 
Upvote 0
i found that it is better to store the list in another tab,
what code shall i change and what tab shall i paste the code in

thanks for the help
:)
 
Upvote 0
Notice the addition of the with statement. Sheet name is coded as "List", please update to what you call the sheet. Values are pasted in columns A/B

Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim oldvalue    As Long
    Dim Rng         As Range
    Dim LR          As Long
    
    oldvalue = Range("A1")
    Set Rng = Target.Parent.Range("A1")
    
    If Target.Count > 1 Then Exit Sub
    If Intersect(Target, Rng) Is Nothing Then Exit Sub
    
    With Sheets("List")        
        LR = .Range("A" & .Rows.Count).End(xlUp).Row + 1
        .Range("A" & LR) = oldvalue
        .Range("B" & LR) = Date
    End With    
End Sub
 
Upvote 0
cell A1 should be in the same sheet also

I don't know what this means.

Let's set the ground rules.

In A1 of a sheet (let's call this the source sheet) you have a number.

Everyday you paste over this value with a value which was stored somewhere else.

When you paste over A1 in the source sheet the old value is now pasted onto sheet "List" in column A with a date in column B.

Please clearly list what is not right with this process?
 
Upvote 0
sorry for the confusion here

stored columns A/B will be in sheet called "Cancellations"

and N8 cell where the value is also found in the same sheet,




i named A1 cell as an example.....
shall i wait for tomorrow to come in order to see the result in columns A/B

thanks
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,513
Members
452,921
Latest member
BBQKING

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