#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
















  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Macro-I think

should have been

ActiveSheet.Range("Print_Area").Sort Key1:=range("Print_Area").Cells(2,
"p"),

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
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


















  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Macro-I think

This works well with one exception...after sorting descending then printing,
I need to sort back to the original data set up, ie: unsort or undo, NOT
ascending.

Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=.Cells(2, 16), Order1:=xlDescending

activesheet.printout
..Sort Key1:=.Cells(2, 16), Order1:=xlascending
End With
End Sub



"Don Guillett" wrote:

should have been

ActiveSheet.Range("Print_Area").Sort Key1:=range("Print_Area").Cells(2,
"p"),

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
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



















  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Macro-I think

There are things you could do such as exiting the workbook without saving or
set up a helper column with 1,2,3,4, etc and sort on that after printing.
This could be done with an addition to the macro.

--
Don Guillett
SalesAid Software

"Inspector" wrote in message
...
This works well with one exception...after sorting descending then
printing,
I need to sort back to the original data set up, ie: unsort or undo, NOT
ascending.

Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=.Cells(2, 16), Order1:=xlDescending

activesheet.printout
..Sort Key1:=.Cells(2, 16), Order1:=xlascending
End With
End Sub



"Don Guillett" wrote:

should have been

ActiveSheet.Range("Print_Area").Sort Key1:=range("Print_Area").Cells(2,
"p"),

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
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





















  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Macro-I think

Not sure I follow you. Let me explain what I do now:

After entering my data I click 'Save'

I then highlight the area I want to sort not including Row 1 which has
column headings. I then click Data, Sort (column P) descending, I then
print, then click "Undo" to return to my original setup before I sorted in
descending order. My sheet has blank rows so column P is a helper column I
guess containing numbers in each cell so that it will sort with the blank
rows in the proper places.

The macro works great for sorting desending then printing but it then sorts
ascending which I dont' want to do. I suppose I could add another column
with numbers in ascending order and after the print I could sort on that
coumn in ascending order. Would that work?

"Don Guillett" wrote:

There are things you could do such as exiting the workbook without saving or
set up a helper column with 1,2,3,4, etc and sort on that after printing.
This could be done with an addition to the macro.

--
Don Guillett
SalesAid Software

"Inspector" wrote in message
...
This works well with one exception...after sorting descending then
printing,
I need to sort back to the original data set up, ie: unsort or undo, NOT
ascending.

Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=.Cells(2, 16), Order1:=xlDescending
activesheet.printout
..Sort Key1:=.Cells(2, 16), Order1:=xlascending
End With
End Sub



"Don Guillett" wrote:

should have been

ActiveSheet.Range("Print_Area").Sort Key1:=range("Print_Area").Cells(2,
"p"),

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
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
























  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Macro-I think

Isn't that what I said. BTW, I do custom work.

--
Don Guillett
SalesAid Software

"Inspector" wrote in message
...
Not sure I follow you. Let me explain what I do now:

After entering my data I click 'Save'

I then highlight the area I want to sort not including Row 1 which has
column headings. I then click Data, Sort (column P) descending, I then
print, then click "Undo" to return to my original setup before I sorted in
descending order. My sheet has blank rows so column P is a helper column
I
guess containing numbers in each cell so that it will sort with the blank
rows in the proper places.

The macro works great for sorting desending then printing but it then
sorts
ascending which I dont' want to do. I suppose I could add another column
with numbers in ascending order and after the print I could sort on that
coumn in ascending order. Would that work?

"Don Guillett" wrote:

There are things you could do such as exiting the workbook without saving
or
set up a helper column with 1,2,3,4, etc and sort on that after printing.
This could be done with an addition to the macro.

--
Don Guillett
SalesAid Software

"Inspector" wrote in message
...
This works well with one exception...after sorting descending then
printing,
I need to sort back to the original data set up, ie: unsort or undo,
NOT
ascending.

Sub sortprintareaonly()
With ActiveSheet.Range("Print_Area")
.Sort Key1:=.Cells(2, 16), Order1:=xlDescending
activesheet.printout
..Sort Key1:=.Cells(2, 16), Order1:=xlascending
End With
End Sub


"Don Guillett" wrote:

should have been

ActiveSheet.Range("Print_Area").Sort
Key1:=range("Print_Area").Cells(2,
"p"),

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
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
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 09:36 PM.

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"