Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

date formatting functions

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Date formatting in Functions

Date formatting in Functions

ResolvedVersion 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?

Edited on Mon 31 Mar 2008, 11:09

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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Shortcut for deleting all comments in a spreadsheet

If you have entered multiple comments into a spreadsheet and wish to delete them all at once, you can achieve this by:

1. Holding down Ctrl, then Shift, then O - this will select all cells containing comments in the worksheet you are looking at.

2. Right-clicking on one of the selected cells, and selecting Delete Comment from the menu that appears.

3. Clicking anywhere else in the spreadsheet to deselect comments - all comments should have disappeared from the spreadsheet.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.