View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Formula - Time, Cell

That's pretty much what his code does except it works for entries in column
B on all rows but row 1. What do you think it does?

--
Regards,
Tom Ogilvy


"Rich" wrote in message
...
JIm THanks for the help but maybe i did not explain myself well.

What i have is a spreadsheet with 7 coloumns and 30 rows
Column B is "Account Number"
Column C is "Time"

Each time someone enters an account # into Coulumn B I want to generate

the
exact time in Column C

And I need to have it do this for each of the 30 rows.

Hope this is easier to understand..and again, thanks!











"Jim Thomlinson" wrote:

Here is the macro you need. You need to paste this into the code for the
sheet you want. In Excel Right Click on the tab where you want this to
happen. Select View Code. Paste this code into the window.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Row 1 And Target.Column = 1 Then
Target.Offset(0, 1).Value = Time
End If
End Sub

This returns only the current system time. If you want it to be the

current
date and time change the word time to now in the code.

HTH

"Rich" wrote:

Hello,
I am having a hard time trying to figure out how to do the following

Basically I have an excel sheet with several columns.
Coloumn A = Account Number
Coloumn B = Time

I would like to have some sort of formula that automaticall enters the

time
(only the time of day) in (b2) when they enter an account number in

cell (a2)

I tried making a macro but it was not working properly can anyone

PLEASE help
Thanks in Advance
-Rich