ExcelTip.com
ExcelTip.com
Account Icon Account Icon Account Icon
Google Exceltip.com
JOIN OUR NEWSLETTER
  and receive for joining:
Free eBook Learn More!
Free Excel ADD-IN
Free Weekly Excel Tip
4 e-books in cd-rom
F1 Formulas & Functions
F1 Formulas & Functions
F1 EXCEL
F1 eBook (Spanish)
F1 EXCEL
Financial Statements.xls
 

» Quickly Typing Dates into Cells
CATEGORY: Excel Editing
Typing a large amount of data into cells can be tiring, especially if it includes a series of dates.

Type the day (serial number only) into cell A1 and add the following formula to insert the month and year into cell B1:

=DATE (YEAR(TODAY()), MONTH(TODAY()), A1)

Type a full number in the cell and change it to a date by using the following formula:

=DATEVALUE(LEFT(A1,2)&"/"&MID(A1,3,2)&"/"
&RIGHT(A1,2))
For example, type 122203, the result is 12/22/03.


Screenshot // Quickly Typing Dates into Cells

Quickly Typing Dates into Cells
Rate this tip
12 34 5
  RATING: 3.07
  VIEWS: 25124

READER COMMENTS (view all comments)


Confused
sbweid wrote on December 31, 1969 19:00 EST
I understand the first part of this example, but the second half is confusing. The formula referred to includes cell A1, but cell A1 only has the day in it. It also refers to a number "122203", but the example has 221203 in cell A3. Can you explain more clearly what is being done here?

Thanks!
answer to confused and another comment
chanebaum wrote on December 31, 1969 19:00 EST
Answer to confused: the 22 is the day of the month, you could modify the formula not to need this entry by replacing "A1" with "day(today())".

Of note, the String formula will only work correctly if the date is entered as a 6 digit number - e.g. you would need to enter the 5th as 05... but this will present another problem to novice users, as the usual formating on excel cells will drop the 0 preceding a number. I would propose the following formula:
=IF(LEN(A3)=6,(LEFT(A3,2)&"/"&MID(A3,3,2)&"/"&RIGHT(A3,2)),(LEFT(A3,1)&"/"&MID(A3,2,2)&"/"&RIGHT(A3,2)))
Extra column
lewmac wrote on December 31, 1969 19:00 EST
This requires an extra column on a table. I guess it could be hidden for print but it would have to be done each time. The top formula worked OK for me but the bottom one gives me a message #VALUE. I have no trouble when I do the sections individually, such as =VALUE(MID(A8,4,2)) -- in row 8.
Error
lewmac wrote on December 31, 1969 19:00 EST
Re the #VALUE message above: I had the cell set at General instead of a date format!!!! It works OK.



REGISTERED USERS - Click here to post comments


GUESTS (Click here to register)
Name
Comment Title
Comments

Real Estate Loopholes: Secrets of Successful Real Estate Investing

Financial Statement Analysis with S&P insert card

Microsoft Word Version 2002 Step By Step (With CD-ROM)

Good to Great: Why Some Companies Make the Leap... and Others Don't

Windows XP Pocket Reference

Microsoft Office XP Step-By-Step (With CD-ROM)

RELATED MICROSOFT EXCEL TIPS


Convert PDF Files to Excel






Excel VBA books
Accounting books
Business Plans
MS Office books
Taxes books

VIEW ALL BOOKS


  Advertise With Us                               

Tips

Add-In in VBA | Applications - Word, Outlook in VBA | Array Formulas | Cells, Ranges, Rows, and Columns in VBA | Counting | Custom Functions | Custom Functions in VBA | Database Formulas | Database in VBA | Date & Time Formulas | Date & Time in VBA | Events in VBA | Excel 2003 | Excel Chart | Excel Consolidating | Excel Counting | Excel Custom Functions using VBA | Excel Customizing | Excel Data | Excel Dates | Excel Editing | Excel Files | Excel Filter | Excel Format | Excel Formula | Excel General | Excel Grouping and Outlining | Excel Importing Text Files | Excel Information | Excel Keyboard Shortcuts | Excel Loan Formulas | Excel Macros - VBA | Excel Pivot Tables | Excel Printing | Excel Range Name | Excel Security - Protection | Excel Sorting | Excel Style | Excel Subtotals | Excel Summing | Excel Text | Excel Time | Excel Tools | Excel Worksheet, Workbook | Files, Workbook, and Worksheets in VBA | Financial Formulas | Formating in VBA | General Topics in VBA | Import and Export in VBA | Information Formulas | Keyboard & Other Shortcuts in VBA | Keyboard Formula Shortcuts | Links between Worksheet and Workbooks | Links in VBA | Logical Formulas | Lookup Formulas | Mail - Send and Receive in VBA | Menus, Toolbars, Status bar in VBA | Modules, Class Modules in VBA | Other Q&A Formulas | Printing in VBA | Protecting in VBA | Summing | Text Formulas | User Forms, Input boxes in VBA | Using Loops | Working with Formulas |

Tips by Version

Microsoft Excel 97 | Microsoft Excel 2000 | Microsoft Excel 2002 | All Microsoft Excel Versions | New in Excel 2002 | New in Excel 2003 - Office 11

Website

Home | Tip of Hour | Recommended Tips | Most Viewed Tips | Tips by Version | Submit a Tip | My Tips
Microsoft Excel Tutorials | Excel Links | Write for Us | About Us | Search Results | Tip Archives | Excel Forum | Excel Forum Archives

Excel Book

Excel 97 Book | Excel 2000 Book | Excel 2002 Book | Excel XP Book | Book Store

Terms and Conditions of use
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Copyright © 2003 ExcelTip.com
Microsoft, Microsoft Excel is a U.S. registered trademark of Microsoft Corporation
Site Developed By: Varien