now function not to update

B

baha

Hi,
First of all I search for smilar question but could not get any
answer,if this is duplucated question,please accept my appoligies.
I have a spread sheet which looks like a log file.What I want to do
is, when I enter a number in a cell in A coloumn, to display the time
in column B.I tried now,but when the next number entered in column A
it all change the entire colum B.I haveother formulas,so that I cannot
chose manual calculations options.
Thanks for your help.
Baha
 
S

Stefi

You need an event macro to do that:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then 'Column A
Range("B" & Target.Row) = Time
End If
End Sub

Post if you need help to install it!

Regards,
Stefi
„baha†ezt írta:
 
B

baha

You need an event macro to do that:

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 1 Then   'Column A
        Range("B" & Target.Row) = Time
    End If
End Sub

Post if you need help to install it!

Regards,
Stefi
„baha” ezt írta:




- Show quoted text -

Hi Stefi,
Thanks for the reply,how do I put that macro?In the sheet or this
workbook?Or honestly I don't know how to run that that macro ?
Thank you very much for the help
baha
 
B

baha

Hi Stefi,
Thanks for the reply,how do I put that macro?In the sheet or this
workbook?Or honestly I don't know how to run that that macro ?
Thank you very much for the help
baha- Hide quoted text -

- Show quoted text -

Thank you Feli I managed to do that.Thank you very much for the help
Have a good weekend
Baha
 
S

Stefi

Open VBA (Alt+F11)!
Right click on your worksheet name in the Project explorer window!
Select View code from the popup menu!
Copy/Paste macro code in the code window!

Thre is no need for any further actions, the event macro shall be triggered
automatically whenever you enter data in column A.


Regards,
Stefi

„baha†ezt írta:
 
S

Stefi

You are welcome! Thanks for the feedback!
Stefi
Clicking the YES button will be appreciated.



„baha†ezt írta:
 

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