#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 460
Default Formula

I want to add a date when I enter information into a cell and keep that date
contant. Example: Col. A cell 2 (Date) Col. B Cell 3 (Bus Number) If our
mechanic works on a bus and enter a bus number the date will auto complete.
That date will stay even when a new cell Bus number is enter in on a
different day.

Date: Bus: #
Oct. 3, 2008 41
Oct. 4, 2008
51

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Formula

Your need a worksheet change function. go to the sheet name tab on the
bottom of the worksheet (like sheet1) and right click. select View Code.
Page the subroutine below on the VBA sheet that appears.


Sub worksheet_change(ByVal target As Range)

If target.Column = 2 Then
target.Offset(0, -1) = Date
End If
End Sub

"Doug" wrote:

I want to add a date when I enter information into a cell and keep that date
contant. Example: Col. A cell 2 (Date) Col. B Cell 3 (Bus Number) If our
mechanic works on a bus and enter a bus number the date will auto complete.
That date will stay even when a new cell Bus number is enter in on a
different day.

Date: Bus: #
Oct. 3, 2008 41
Oct. 4, 2008
51

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



All times are GMT +1. The time now is 12:49 PM.

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"