ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I find the rowheight and use it in a formula? (https://www.excelbanter.com/excel-programming/395116-how-can-i-find-rowheight-use-formula.html)

[email protected]

How can I find the rowheight and use it in a formula?
 
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.


Rick Rothstein \(MVP - VB\)

How can I find the rowheight and use it in a formula?
 
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



wrote in message
ups.com...
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.



[email protected]

How can I find the rowheight and use it in a formula?
 
On Aug 9, 1:43 am, "Rick Rothstein \(MVP - VB\)"
wrote:
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

wrote in message

ups.com...



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.- Hide quoted text -


- Show quoted text -


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



All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com