Problem with time formula!

O.K. here it is!!!

I'm working on some sort of TimeCard.
Use in my sheet, vlookup, Now() and that kind of formulas.

Let's say I put Work Code like P1 in cell B4, that enters Description of kind of my work in D4 and start time in cell E4. After a minute I enter second work code in B5, that enters End time in F4 and How much time I needed for first event in G4 for first event and descrption for second event in D5 + start time in E5.

Problem is when I enter second event,
all times are the same so I can't calculate How much I use for first event.
I can solve this by macro, but I would like to solved this with formula.

Sebastian
Sebastian20Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sblawrenceCommented:
You're using =now() as a formula in a cell? As soon as you do this all other cells will update with any changes. I think you will need to do this in VBA. By updating the cell with VBA, the cell contains a value that is 'now' not a formula that will change.
Try the following code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If ActiveCell.Column = 2 Then
    ActiveCell.Offset(-1, 3).Range("a1").Select
    ActiveCell = Now()
    ActiveCell.Offset(-1, 1).Range("a1").Select
    ActiveCell = Now()
    ActiveCell.Offset(2, -4).Range("a1").Select
End If
End Sub

This will (if I've read your query right) update the cells you need updating as soon as you enter anything in the second column.
0
Sebastian20Author Commented:
Edited text of question.
0
sblawrenceCommented:
Well, hey thanks for re-editing - it was best advice I could give (heavy irony intended).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sebastian20Author Commented:
Thanks for anwser!!!
Sebastian
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.