Sorting by date

  • Thread starter Thread starter madbloke
  • Start date Start date
M

madbloke

Hi,

I have an Excel sheet with a list of approx 150 documents i
alphabetical order, and column G contains the date the document wa
last updated. What I need to do is put some code into a worksheet tha
will pull each row through and then sort it by date. Any ideas
 
Not sure what pull each row through means, but have you tried the macro
recorder?
 
Hi MadBloke,

At a guess, try something like:

Sub Tester()
Range("G1").CurrentRegion.Sort Key1:=Range("G2"), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top