Fixing the date.

  • Thread starter Thread starter cs2883
  • Start date Start date
C

cs2883

I have a weekly production sheet and want it to put the date in
automatically when i enter the production info.

So on the first day it would put the date in, and on the next day it
would put that date in.

Its so i can put the week day in to calculate weekly production.

Is this possible or am i just been lazy.

Any help would be much apprecieated.

cheers

Ian
 
cs2883 said:
I have a weekly production sheet and want it to put the date in
automatically when i enter the production info.

So on the first day it would put the date in, and on the next day it
would put that date in.

Its so i can put the week day in to calculate weekly production.

Is this possible or am i just been lazy.

Any help would be much apprecieated.

cheers

Ian
Not exactly what you asked but will this work?

Insert a static date or time

Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;
 
Ian

If your data is being entered in column A and you want a date stuck into
column B use this event code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
n = Target.Row
If Excel.Range("A" & n).Value <> "" Then
Excel.Range("B" & n).Value = Date
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is worksheet event code.

Right-click on the sheet tab and "View Code". Copy/paste the code into the
module.


Gord Dibben Excel MVP
 
Ok, i'm really new to all this. What exactly do i have to do with that.
I've tried to put it in as a macro. Is that right? If not what do i
do?

Sorrry to be a pain!

cheers in advance

Ian
 
Its ok, i got the idea of how to do it from another post.

This forum is ace!!

cheers

Ian
 
Back
Top