make cell value equal another after new row inserted

I had this question after viewing insert new row above with formatting is cell value >00:01.

I would like to add some code so that cell C9 on the newly inserted row always equals cell D10 after the new row has been added.
any help appreciated
thanks
Sarah
SarahAsked:
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.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
To achieve that, replace the existing change event code on Data Entry Sheet Module with the following code...

Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("B9:G9")) Is Nothing And Target.Count = 1 Then
        If WorksheetFunction.CountA(Range("B9:G9")) = 6 And Range("H9") > 1 / (24 * 60) Then
            Application.EnableEvents = False
            Application.ScreenUpdating = False
            Rows(9).Insert
            Range("B10:H10").Copy Range("B9")
            Application.CutCopyMode = False
            Range("B9:G9").ClearContents
            Range("C9").Value = Range("D10").Value
            Range("B9").Select
            Application.EnableEvents = True
        End If
    End If
End Sub

Open in new window

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
SarahAuthor Commented:
Wonderful - works perfectly and super fast response. Many thanks :-)
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Sarah! You forgot to award the bonus points. :)
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
No worries! That is fixed now. Thanks!
0
SarahAuthor Commented:
ok - just let me know if I need to do anything else. thanks Sarah
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Don't worry, all is fixed now. Thanks!
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
Microsoft Office

From novice to tech pro — start learning today.