How do I insert the date using a macro

T

tara0801

I know this is probably simple, but I can't seem to get it.

As a macro, I want to do is insert the date so it doesn't change everytime I
go into excel in one column, then the next column have initials appear right
next to it.

I want to set this up as a macro so it's one less thing to type. The date
and initials get typed often so I want the macro to be able to work in
another cell as well. When I tried to create a macro, it only worked in the
cell I recorded it in.

Example
Column A Column B
2/10/2005 MH

Any help would be appreciated
 
J

JE McGimpsey

one way:

Public Sub DateAndInitials()
With Selection(1)
.Numberformat = "m/dd/yyyy"
.Value = Date
.Offset(0, 1).Value = "MH"
End With
End Sub
 
D

Don Guillett

Not clear what your are trying to do or how much you know but this enters a
date.
range("a1")=date
 
G

Gord Dibben

Tara

Same initials each time?

Sub NOWDATE()
With ActiveCell
.Value = Format(Date, "dd-mmm-yy")
.Offset(0, 1).Value = "MH"
End With
End Sub

Assign to a button or shortcut-key combo.


Gord Dibben Excel MVP
 
Top