Enter current time in a cell by clicking it
Solved/Closed
Related:
- Which function will you use to enter current time in a worksheet cell
- Which function will you use to enter current date in a worksheet cell - Best answers
- Which function will you use to enter current date and time in a worksheet cell - Best answers
- How to enter @ in laptop - Guide
- Popcorn time download - Download - Movies, series and TV
- Activeworkbook.worksheets current worksheet ✓ - Excel Forum
- Insert a function in cell b2 to display the current date from your system. ✓ - Excel Forum
- How to change time in whatsapp - Guide
7 responses
Check this one out. It worked great for me! If anything you would just have to have a blank cell with something like:
Assuming A2 as the input cell:
Type this in D2
=if(A2=1,"Dispatched","")
Then have your guys just type a "1" when they dispatch.
Then right click on the spreadsheet tab. Select "View Code"
Copy and paste this:
--------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 2)
.Value = Date
.EntireColumn.AutoFit
End With
End If
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 3)
.Value = Time
.EntireColumn.AutoFit
End With
End If
End Sub
---------------------------------------------------- (without the lines though).
Every time they type a 1 on A2 and hit "Enter" the date will appear on B2, time on C2 and "Dispatched" on D2.
Hope this helps.
Assuming A2 as the input cell:
Type this in D2
=if(A2=1,"Dispatched","")
Then have your guys just type a "1" when they dispatch.
Then right click on the spreadsheet tab. Select "View Code"
Copy and paste this:
--------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 2)
.Value = Date
.EntireColumn.AutoFit
End With
End If
If Not Intersect(Target, Range("A2:A10000")) Is Nothing Then
With Target(1, 3)
.Value = Time
.EntireColumn.AutoFit
End With
End If
End Sub
---------------------------------------------------- (without the lines though).
Every time they type a 1 on A2 and hit "Enter" the date will appear on B2, time on C2 and "Dispatched" on D2.
Hope this helps.
Feb 1, 2013 at 05:24 PM
Mar 5, 2013 at 03:50 PM
Can you please show me, if I am using date in C2 and frequency in D2(in months variable) and like to update in E2
May 27, 2013 at 03:19 AM
If Not Intersect(Target:range.... the first one
It complains at Intersect
May 27, 2013 at 08:59 AM
Aug 2, 2017 at 06:48 PM