Hi
Is that some kind of fromula on the end?
seting a print area should look llike this
ActiveSheet.PageSetup.PrintArea = "$C$5:$J$24"
In your code
ActiveSheet.PageSetup.PrintArea = "$a$1:$z$"&CEILING(COUNTA(D3:D42)/8;1)*46
You seem to have somekind of formula on the end
Hope it helps
Bookmarks