Link to home
Start Free TrialLog in
Avatar of DarrinE
DarrinE

asked on

Excel and DateAdd

In excel I would like to use the DateAdd function to add a number of days to a date which are contained in cells using the following function

Function DatesAdd(iinterval As String, nnumber As Integer, ddate As Date) As Integer

    DatesAdd = DateAdd(iinterval, nnumber, ddate)

End Function


In the formula bar - how would I call this function ?

I have tried

=DatesAdd("d",D11,B11)

but get the #Value! error

DarrinE

Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Are you sure that DateAdd is existing as a formula in Excel. I don't see it!

You can do simply : =D11+B11
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DarrinE
DarrinE

ASKER

Good pickup TimCottee - my silly error not picking it up that I was not returning a date - dont you hate days like that - I spent nearly an hour checking and double checking what I was doing ... I think I need some sleep .. lol

DarrinE