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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
DarrinE
You can do simply : =D11+B11