Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tara0801
 
Posts: n/a
Default How do I insert the date using a macro

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
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

one way:

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


In article ,
"tara0801" wrote:

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

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

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

On Thu, 10 Feb 2005 08:55:02 -0800, "tara0801"
wrote:

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


  #5   Report Post  
tara0801
 
Posts: n/a
Default

Thank you so much. That is exactly what I wanted.

"JE McGimpsey" wrote:

one way:

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


In article ,
"tara0801" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert date in macro George Gee New Users to Excel 12 April 17th 06 05:44 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
how to alter the date within a macro LWhite Excel Discussion (Misc queries) 2 January 4th 05 01:54 PM
Date and Time Macro m.j.anderson Excel Discussion (Misc queries) 1 December 1st 04 12:35 AM


All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"