Insert Formula with VBA error

I have the following formula that i am inserting with vba (it is part of a much bigger macro)

Columns("D:D").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("D1:D5000").Formula = _
        "=DATE(1970,1,1)+D1/86400)"

when it runs (it is all OK) until it gets to the inserting the formula then i get an error. cant see where I am going wrong ?
bryanscott53Asked:
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.

NorieVBA ExpertCommented:
You've got an extra parenthesis either at the end of the formula or after the date function:

It should be either:

"=DATE(1970,1,1)+D1/864000"

Or

"=DATE(1970,1,1+D1/864000)"

I suppose it depends on what's in D1 and what you are trying to add to the date.
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
bryanscott53Author Commented:
of course, couldnt see it for looking!!
0
NorieVBA ExpertCommented:
Which one was it?
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 Excel

From novice to tech pro — start learning today.