View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert[_17_] Robert[_17_] is offline
external usenet poster
 
Posts: 1
Default Sorting a date range of data

Hi, I hope you can help. I have a worksheet containing
columns of data. I use the following to sort column A in
date order;

Columns("A:H").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A1").Select

But what I would like to do is to display only the data in
a specified range, for example say;

startdate = "01/10/03"
enddate = "15/10/03"

Is there a way I could state a macro that would either
delete all the data outside this range leaving the data I
require, or copy the required data to another worksheet so
that I can then display it from there.

Thanks
Robert