Input Question Help

J

James8309

Hi everyone,

I was wondering if there is any function or VBA coding out there allow
me to do this.

Each time I type something into each cell in Range("B2:B100") it will
display the time it was entered in (hh:mm)

e.g.

when I type "ABC" in B2 at 3:40pm it will display 3:40pm or 15:40 in
cell A2. When I type in "DEF" or any entry at B3 at 4:00pm it will
display 4:00pm or 16:00 in Cell A3.

Is this possible?

Please help

Thanks alot
 
L

Lars-Åke Aspelin

Hi everyone,

I was wondering if there is any function or VBA coding out there allow
me to do this.

Each time I type something into each cell in Range("B2:B100") it will
display the time it was entered in (hh:mm)

e.g.

when I type "ABC" in B2 at 3:40pm it will display 3:40pm or 15:40 in
cell A2. When I type in "DEF" or any entry at B3 at 4:00pm it will
display 4:00pm or 16:00 in Cell A3.

Is this possible?

Please help

Thanks alot


Try putting this procedure into the worksheet:

Private Sub Worksheet_Change(ByVal Target As Range)
Set myrange = ActiveSheet.Range("B2:B100")
If Not Intersect(Target, myrange) Is Nothing Then
Target.Offset(0,-1) = Time()
End Sub

Hope this helps / Lars-Åke
 

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