Excel/Auto sort formula


Hi is there an easy way to make excel automatically sort information by date if added to a new line underneath current information:
so if the information on the goes something like

date activity instructor cover
02/08 spin      joe       bob
04/08 yoga      sam       carol

then next line

03/08  abs       john      dave

So once the information is entered it places itself in date order, sorry if that's long winded but hard to put whats in my mind across easy :) I was considering having a specific line for information to be put into the allocated into the spreadsheet.

Thanx in advance

Real answer to your question: no.
However, you CAN do it by a macro and it'll happen automatically (because of the macro).
Say your data starts in A1.
Right-click the sheet tab, select View Code, enter this (copy/paste)

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column = 4 Then
       Range("A1").CurrentRegion.Sort key1:=[a2], order1:=xlAscending, Header:=xlYes
   End If
End Sub

It will sort after you enter the data in column D.

If your file ends in xlsx you will have to save it as xlsm
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Bob Umlas


I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/


Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Excellence, The Expert, Microsoft

BA in math, Hofstra University, 1965

Awards and Honors
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2017 About.com. All rights reserved.