98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Date formatting in Functions
Date formatting in Functions
Resolved · Low Priority · Version Standard
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Deleting a range of cells using the autofill handleFirstly, select the range of cells for which you would like to clear the contents. Then drag the autofill handle to the the top left corner of the selection whilst holding down the shift key. Your selected contents should then be deleted. |