KlausW
Active Member
- Joined
- Sep 9, 2020
- Messages
- 453
- Office Version
- 2016
- Platform
- Windows
Hi every one
I have this VBA code that runs perfect. In column A there are dates, when I press in a cell in column J the date will be showen in cell j1.
Example I press in j2 and the date 01-05-2024 comes from A2 (Danish date) in cell J1, I press cells j3 then 02-05-2024 appears in cell j1 etc. Can you make it so that an S appears in column J in the cells you press.
Any help will be appreciated
Best Regards
Klaus W
I have this VBA code that runs perfect. In column A there are dates, when I press in a cell in column J the date will be showen in cell j1.
Example I press in j2 and the date 01-05-2024 comes from A2 (Danish date) in cell J1, I press cells j3 then 02-05-2024 appears in cell j1 etc. Can you make it so that an S appears in column J in the cells you press.
Any help will be appreciated
Best Regards
Klaus W
VBA Code:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("$j$2:$j$41")) Is Nothing Then
Range("$J$1").Value = Target.Offset(0, -9).Value
'MsgBox "Mail"
'Call
End If
End If
End Sub