Thread
:
Macro-I think
View Single Post
#
1
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
Posts: 10,124
Macro-I think
Sub sortprintareaonly()'another way with a one liner
ActiveSheet.Range("Print_Area").Sort Key1:=range("print_area").Cells(2,
"p"),
Order1:=xlDescending
End Sub
--
Don Guillett
SalesAid Software
"Don Guillett" wrote in message news:...
Are you trying to be funny or did you really goto college at Texas A&M?
range("p2") is the same as cells(2,"P") or cells(2,16)
Sub sortprintareaonly()'another way
ActiveSheet.Range("Print_Area").Sort Key1:=.Cells(2, "p"),
Order1:=xlDescending
End Sub
--
Don Guillett
SalesAid Software
"Inspector" wrote in message
...
Is this what you're getting at?
Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=Range(P2).Cells(2, 1), Order1:=xlDescending
End With
End Sub
"Don Guillett" wrote:
Perhaps a re-read of this may help you determine which column you
desire.
Since you didn't say what your "sort" column was, I was sorting by
range(a2)
cells(2,1)
--
Don Guillett
SalesAid Software
"Inspector" wrote in message
...
I'd love to but I'm lost, no clue. Sorry.
"Don Guillett" wrote:
Do so.
--
Don Guillett
SalesAid Software
"Inspector" wrote in message
...
My sort column is column P and I would like to activate it using
'control
Q' or some other key along with the control key.
"Don Guillett" wrote:
Since you didn't say what your "sort" column was, I was sorting by
range(a2)
cells(2,1)
--
Don Guillett
SalesAid Software
"Inspector" wrote in message
...
It may do the trick.....but given the fact I know nothing about
writing
a
macro....do I need to do anything else to this to fit my
particular
sheet
or
will this do it as it is?
"Don Guillett" wrote:
Does this help?
Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=.Cells(2, 1), Order1:=xlAscending
End With
End Sub
--
Don Guillett
SalesAid Software
"Inspector" wrote in
message
...
I would like to create a macro that will be triggered by
'control
Q'
to
sort
my data in decending order using my "sort" column. The
amount of
data
will
vary so I will need it to sort the print area only. Is this
possible?
I
have no idea where to begin. Can someone help with this?
Thanks,
Inspector
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett