The date & time of a cell is input
The date & time of a cell is input
(OP)
I am creating a database which for inventory items stock. Is that possible to show the date and time in a cell of the same row where and when I input stock information?





RE: The date & time of a cell is input
Please provide a better description and post some sample data so we can clearly see what you want to to do.
Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
http://www.energyefficientbuild.com
RE: The date & time of a cell is input
PartNo PartStatus Qty Date & Time
123456 Received 200 2007-4-13 16:33
123457 Sent 100 2007-4-14 9:23
I want the "Date & Time" input automaticly. For example, as the time input the Qty.
RE: The date & time of a cell is input
Range("DateTime").Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
You use the function NOW() placed in a cell with a defined name of DateTime
You assign it to a floating button. once you enter the data, you select the empty cell and push the button. The macro copies the timestamp and pastes it as hard data into the empty cell selected.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: The date & time of a cell is input
One way would be to use Worksheet_Change event ...
CODE
If Target.Column = 3 And IsNumeric(Target) Then Target(1, 2) = Date & Time
End Sub
I hope this helps.
Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
http://www.energyefficientbuild.com
RE: The date & time of a cell is input
I improved you marco,
Selection.NumberFormat = "m/d/yyyy h:mm"
Range("DateTime").Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
yogia, I don't know how to use it, sorry
RE: The date & time of a cell is input
Cheers,
Joerd
Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: The date & time of a cell is input
Hi Robert:
The Worksheet_Change event code I provided is triggered automatically whenever a numeric is entered in column C ... then in the corresponding cell in column D current Date and Time are automatically entered.
To install the Worksheet_Change code, copy the code as I provided, then right click on the worksheet tab and click on View_Code -- that will take you to the VBA code window -- paste the code in there. Click ALT-F11 to return to EXCEL worksheet environment and the code will be in-waiting ready to be triggered whenever a numeric is entered in column C.
I hope this helps.
Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
http://www.energyefficientbuild.com
RE: The date & time of a cell is input
Normally, I just use VBA to build some functions for myself. You opened a new door for me, thanks again.
RE: The date & time of a cell is input
You Are Very Welcome ... now let us keep EXCELing!
Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
http://www.energyefficientbuild.com
RE: The date & time of a cell is input
=if(b2="","",today())
RE: The date & time of a cell is input
TTFN
FAQ731-376: Eng-Tips.com Forum Policies