Excel Macro for time "Excel 2003"

V

vijay

Hi,
I work on the excel sheet everyday and following is my probem'


A B C
D E
Start time End time Filename Status
Count
1 ? ? Amway Entered
43
2 ? ? Geo
Applied 17
3 ....... ....... .........
....... .......
and so on.
When i enter "Amway" in column "C1", The Column "A1" should automatically
show the current time of the system as "Start time". And when i key "Entered"
in column "D1" , The Column "B1" should automatically show the current time
of the system as "End time".
I would not like to use Ctrl+Shift+: for current time, for each file as
their is huge date on the daily basis. So need a help from u that would save
my time & at the same time increase in the productive.
--
vijay

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...a-e2ff619bc498&dg=microsoft.public.excel.misc
 
B

Barb Reinhardt

Right click on the worksheet tab in question and select VIEW CODE.

Paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Row = 1 Then Exit Sub

If Not Intersect(Target, Me.Range("$C:$D")) Is Nothing Then
With Target.Offset(0, -2)
.Value = Date + Time
.NumberFormat = "m/d/yyyy h:mm AM/PM"
End With
End If

End Sub

Right now, this will put a date in if anything is entered in column C or D.
If you want it to check for specific things in each column, that would
require some additional code changes for you. :) If you have questions,
come back.
 
V

vijay

Hi Barb,
Thank for ur help. but still i did find solution for it.
if u could give me ur email ID i will send u the excel sheet that i'm
working on and again thank.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top