Lisa has attended:
Excel VBA Intro Intermediate course
Date formatting in Functions
If creating a function using date, how do you get the answer to be formatted in date format?
RE: Date formatting in Functions
Hi Lisa, Welcome to the forum, Thank you for your post, in answer to your question, if the result is going to be in a date style, ie separated by hyphens (-) or the forward slash (/) Excel will recognise that it is to be a date, however in all other cases the number of days from the 1/1/1900 will be returned, this is more a question of the formatting properties of the receiving cell rather than the actual function itself. I suppose you could add further commands to the function if you desired or you could format the receiving cell/s and then the input will automatically be fomatted as whatever date style you require whenever the cell is populated. I hope that helps, best regards Pete