Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = 0 Then
Select Case Target.Address
Case "$A$15", "$A$48", "$A$49", "$A$50", "$A$51", "$A$52", "$A$53", "$A$54", "$A$55", "$A$56", "$A$57", "$A$58", "$A$59", "$A$60", "$A$61", "$A$62", "$A$63", "$A$64", "$A$65", "$A$66", "$A$67", "$A$68", "$A$69", "$A$70", "$A$71", "$A$72", "$A$73", "$A$74", "$A$75", "$A$76", "$A$77", "$A$16", "$A$17", "$A$18", "$A$19", "$A$20", "$A$21", "$A$22", "$A$23", "$A$24", "$A$25", "$A$26", "$A$27", "$A$28", "$A$29", "$A$30", "$A$31", "$A$32", "$A$33", "$A$34", "$A$35", "$A$36", "$A$37", "$A$38", "$A$39", "$A$40", "$A$41", "$A$42", "$A$43", "$A$44", "$A$45", "$A$46", "$A$47", "$L$15", "$L$16", "$L$17", "$L$18", "$L$19", "$L$20", "$L$21", "$L$22", "$L$23", "$L$24", "$L$25", "$L$26", "$L$27", "$L$28", "$L$29", "$L$30", "$L$31", "$L$32", "$L$33", "$L$34", "$L$35", "$L$36", "$L$37", "$L$38", "$L$39", "$L$40", "$L$41", "$L$42", "$L$43", "$L$44", "$L$45", "$L$46", "$L$48", "$L$47", "$L$49", "$L$50", "$L$51", "$L$52", "$L$53", "$L$54", "$L$55", "$L$56", "$L$57", "$L$58", "$L$59", "$L$60", "$L$61", "$L$62", "$L$63" _
, "$L$64", "$L$65", "$L$66", "$L$67", "$L$68", "$L$69", "$L$70", "$L$71", "$L$72", "$L$73", "$L$74", "$L$75", "$L$76", "$L$77"
Target.Value = Date
Target.NumberFormat = "dd.mm.yy"
End Select
End If
End Sub
I'm trying to have this code insert Timestamp whenever a cell in side the Ranges is clicked, so far it does work but the timestamp changes when its clicked again, so i tried entering If Target = 0 to force it to only do it when the cell is empty, but it runs on all the cells now
Bookmarks