How to keep timestamp for hyperlink clicked multiple times

wardamneagle21

New Member
Joined
Jun 27, 2024
Messages
8
Office Version
  1. 2016
Platform
  1. Windows
I have a file where I have hyperlinks that once clicked records how many times they are clicked and a current timestamp. However once the hyperlink is clicked again the time and date update again which is great for the new record but I still need the record of the time and date when it was previously clicked. Is there a way (formula or vba) that I could use that once the hyperlink is clicked it sets the old time and date in stone and creates a new record in another cell of the new time?

Thanks for any help!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I have a file where I have hyperlinks that once clicked records how many times they are clicked and a current timestamp.
Can you give a couple examples of the hyperlinks and how and where you are doing this ?
 
Upvote 0
Here is the VBA Screen and macros. Once the hyperlink is clicked it goes to the link then offsets the date and time, I put the copy and paste as to try to keep a running list of all the times its clicked but it always refreshes

1719502553830.png


Here is a picture of the file. Again hyperlink clicked counter beside it goes up and it dates and times it. but the last 5 columns is where i want it to repeat the number of times it was clicked like it does but instead of updating the time, keep the times for when it was clicked.

1719502605151.png



Thank you for any help!

Let me know if this is confusing in any way, and i will try to explain it further.
 
Upvote 0
Disregard the second picture last column i had typed in those values, this is how it usually looks

1719503067168.png
 
Upvote 0
Let me know if this is confusing in any way, and i will try to explain it further.
It is.
But here's my guess as to what I think you're trying to accomplish
VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    Dim HypCell As Range, rowNum As Long, colNum As Long
        
If Not Intersect(Target.Range.Cells, Range("I:I")) Is Nothing Then
    Set HypCell = ActiveCell
    
    With HypCell
        .Offset(, 1) = .Offset(, 1) + 1
        .Offset(, 2) = Date
        .Offset(, 3) = Time
        rowNum = .Row
    End With
    
    colNum = Cells(rowNum, Columns.Count).End(xlToLeft).Column
    Cells(rowNum, colNum + 2) = Date
    Cells(rowNum, colNum + 3) = Time
    
End If

End Sub
 
Upvote 0
Solution
You're welcome, glad I could assist.
Thank you for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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