Simon Lloyd
05-07-2007, 09:24 AM
Hi all, i am currently trying to print out a range using a dynamic named range like this:
Sub GenReportPrint()
Range("GenRepPrint").PrintOut
End Sub
which works fine and GenRepPrint is defined like this
:=OFFSET('Generated Report'!$A$1,0,0,COUNTA('Generated Report'!$A:$A),7)however if the range has any blank rows it prints that many less, i.e if i have 22 rows of data that would fall in to the area of the dynamic named range and lets say rows 15 & 16 are blank then it will only print out rows 1 to 20.
If i go to Insert | Names | Define and click in the formula box for this name even though my last row of data would be in row 22 it only highlights rows 1 to 20 because of the 2 blank rows.
How do you create a dynamic named range for non contiguous data?
Regards,
Simon
Sub GenReportPrint()
Range("GenRepPrint").PrintOut
End Sub
which works fine and GenRepPrint is defined like this
:=OFFSET('Generated Report'!$A$1,0,0,COUNTA('Generated Report'!$A:$A),7)however if the range has any blank rows it prints that many less, i.e if i have 22 rows of data that would fall in to the area of the dynamic named range and lets say rows 15 & 16 are blank then it will only print out rows 1 to 20.
If i go to Insert | Names | Define and click in the formula box for this name even though my last row of data would be in row 22 it only highlights rows 1 to 20 because of the 2 blank rows.
How do you create a dynamic named range for non contiguous data?
Regards,
Simon