How can I find the rowheight and use it in a formula?

  • Thread starter Thread starter RJQMAN
  • Start date Start date
R

RJQMAN

My spreadsheet hides certain rows depending on data input. I would
like to add up the total height of all the rows after some are hidden
to help determine if multiple pages are needed to print out the total
sheet. It is my intention to set up special formatting for printing
if the total row height exceeds a certain number.

Is there any practical way to read the row heights of several rows and
add them together - then use the total number in another formula? I
can do this with column widths, but I do not know if it can be done
with row heights.

Thanks in advance for any help.
 
Apparently, you can just ask the Range object its height... it will only
count visible rows. For example,

TotalHeight = Range("A1:A50").Height

Now this appears to return return the height in Points. To get inches,
divide by 72...

TotalHeightInInches = Range("A1:A50").Height / 72

Rick
 
Apparently, you can just ask the Range object its height... it will only
count visible rows. For example,

TotalHeight = Range("A1:A50").Height

Now this appears to return return the height in Points. To get inches,
divide by 72...

TotalHeightInInches = Range("A1:A50").Height / 72

Rick








- Show quoted text -

Thank you very much. That works perfectly. Your help is really
appreciated.
 
Back
Top