sorting columns by date

acm

New Member
Joined
Jun 14, 2008
Messages
2
Hello,

I know this is an easy question but was hoping to get some help because it's taking me too long to figure out. I was looking to sort severy columns by depart date with the most current date showing at the bottom. Each row will contain information associated with these to dates, for example, trip expenses. The rows are entered by the end user and are sometimes put in after the fact and don't always sort chornologically. Therfore, what is the best way to format this sheet so the dates and the other associated information in others cells surrounding these dates properly stays together in the the row....each row is a record. I don't want to the user to sort every time using the A-Z sort. Should I build a MACRO or does 2007 have a feature you can autosort columns somwhere?

Also, do you recommend I build a form to accomodate data entry?

Thanks in advance,
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Thanks...looks like I'll have some fun creating today. How do I solve my formatting issue so the dates will always be sorted no matter when the end user enters the data?
 
Upvote 0
How do I solve my formatting issue so the dates will always be sorted no matter when the end user enters the data?
Sorting a table of data has nothing to do with Formatting, it is just Sorting.

To Sort a range of cells using code:
Code:
Sub SortRange()
    Range("A1").Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess
End Sub
This code assumes your data starts in cell A1 and your dates are in column B.
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,603
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top