LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default 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
















 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM


All times are GMT +1. The time now is 12:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"