I have a problem that seems not to be exotic, however I couldn't find any solution via googles. I'm developing a universal macro to print reports from excel. Report need to be fit to one page wide by X pages tall (I use landskape orientation). Reports may have different number of rows and different number of columns as well. The problem is: how to find out how many pages a particular report will have? As sum of column's widht is a variable, the number of rows on each page is a variable too.
I assumed that sum of columns width to sum of rows height would be a fixed ratio (from my calculation this would be about 1,330978261), however doing it this way didn't worked well.
Do you have any ideas how to deal with it?