![]() |
Set print area
i got no takers first time.
i have a worksheet that lists all zipcodes w/in a specified radius 5, 10, 15 20 and 25 miles, then a run a macro to place them in ascending order, then i want to print only the sorted data that meet the spec. in some cases it could be one or upwards of 100 or so that would run to two pages. if i were to do a calculation to put say an "x" in the far right column to indicate the lower right of the print range, is there a way a macro could print from A1: "x", w/out having to highlight each and every time...there are about 50 sheets to print. thanks |
Set print area
Is this easy enough?
Sub printwhatarea() myrow = InputBox("row number") Range("a2:f" & myrow).PrintPreview End Sub -- Don Guillett SalesAid Software "reno" wrote in message ... i got no takers first time. i have a worksheet that lists all zipcodes w/in a specified radius 5, 10, 15 20 and 25 miles, then a run a macro to place them in ascending order, then i want to print only the sorted data that meet the spec. in some cases it could be one or upwards of 100 or so that would run to two pages. if i were to do a calculation to put say an "x" in the far right column to indicate the lower right of the print range, is there a way a macro could print from A1: "x", w/out having to highlight each and every time...there are about 50 sheets to print. thanks |
Set print area
Thanks, two add'l questions...can this be changed to Print instead of
PrintPreview to save time? Second, can you code be added to this sorting macro? Sub dist_sort() ' ' dist_sort Macro ' Macro recorded 1/23/2007 by Bob Bridwell ' ' Keyboard Shortcut: Ctrl+Shift+Q ' Range("A8:AC113").Select ActiveWindow.SmallScroll Down:=-102 ActiveWindow.SmallScroll ToRight:=-4 Selection.Sort Key1:=Range("H8"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal end sub and it doesn't get much easier!! "Don Guillett" wrote: Is this easy enough? Sub printwhatarea() myrow = InputBox("row number") Range("a2:f" & myrow).PrintPreview End Sub -- Don Guillett SalesAid Software "reno" wrote in message ... i got no takers first time. i have a worksheet that lists all zipcodes w/in a specified radius 5, 10, 15 20 and 25 miles, then a run a macro to place them in ascending order, then i want to print only the sorted data that meet the spec. in some cases it could be one or upwards of 100 or so that would run to two pages. if i were to do a calculation to put say an "x" in the far right column to indicate the lower right of the print range, is there a way a macro could print from A1: "x", w/out having to highlight each and every time...there are about 50 sheets to print. thanks |
Set print area
i had to use printout instead of print
and the addl code didn't seem to work...long time user, but new to macros thanks "Don Guillett" wrote: instead of .printpreview Sub dist_sort() ' myrow = InputBox("row number") 'or maybe this is better myrow=cells(rows.count,"a").end(xlup).row 'last row in col A Range("a8:ac" & myrow).Sort Key1:=Range("H8"), Order1:=xlAscending end sub -- Don Guillett SalesAid Software "reno" wrote in message ... Thanks, two add'l questions...can this be changed to Print instead of PrintPreview to save time? Second, can you code be added to this sorting macro? Sub dist_sort() ' ' dist_sort Macro ' Macro recorded 1/23/2007 by Bob Bridwell ' ' Keyboard Shortcut: Ctrl+Shift+Q ' Range("A8:AC113").Select ActiveWindow.SmallScroll Down:=-102 ActiveWindow.SmallScroll ToRight:=-4 Selection.Sort Key1:=Range("H8"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal end sub and it doesn't get much easier!! "Don Guillett" wrote: Is this easy enough? Sub printwhatarea() myrow = InputBox("row number") Range("a2:f" & myrow).PrintPreview End Sub -- Don Guillett SalesAid Software "reno" wrote in message ... i got no takers first time. i have a worksheet that lists all zipcodes w/in a specified radius 5, 10, 15 20 and 25 miles, then a run a macro to place them in ascending order, then i want to print only the sorted data that meet the spec. in some cases it could be one or upwards of 100 or so that would run to two pages. if i were to do a calculation to put say an "x" in the far right column to indicate the lower right of the print range, is there a way a macro could print from A1: "x", w/out having to highlight each and every time...there are about 50 sheets to print. thanks |
All times are GMT +1. The time now is 02:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com