Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello,
I have completed phase one of my macro and am now on phase two, this requires me to print a specific range from a spreadsheet. If i had in a spreadsheet dat which lets say is a total of 200 lines, in column A each line will either display a number from 1 to 5, and they will be in order, i.e. first 50 rows are the 1s, then the 2s etc. i dont know how many of each number there are and i want my macro to look and i print each set in turn, i.e for 1 it will identify where the first row containing a one is and the last row containing a 1 (all in column A) and thus will give me a range, Any help please, thanks andy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for i = 1 to 5
ActiveSheet.Range("A1").CurrentRegion _ .Autofilter Field1:=1, Criteria1:=i Activesheet.Printout Next i -- Regards, Tom Ogilvy "Momo" wrote in message ... hello, I have completed phase one of my macro and am now on phase two, this requires me to print a specific range from a spreadsheet. If i had in a spreadsheet dat which lets say is a total of 200 lines, in column A each line will either display a number from 1 to 5, and they will be in order, i.e. first 50 rows are the 1s, then the 2s etc. i dont know how many of each number there are and i want my macro to look and i print each set in turn, i.e for 1 it will identify where the first row containing a one is and the last row containing a 1 (all in column A) and thus will give me a range, Any help please, thanks andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
updating cell range depending on input value | Excel Worksheet Functions | |||
How do I reference a range of cells depending on another cell valu | Excel Discussion (Misc queries) | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Conditional formatting depending a range of cell | Excel Worksheet Functions | |||
Setting print area depending on a cell value | Excel Programming |