PC Review


Reply
Thread Tools Rate Thread

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

 
 
RJQMAN@gmail.com
Guest
Posts: n/a
 
      9th Aug 2007
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.

 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      9th Aug 2007
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



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>


 
Reply With Quote
 
RJQMAN@gmail.com
Guest
Posts: n/a
 
      11th Aug 2007
On Aug 9, 1:43 am, "Rick Rothstein \(MVP - VB\)"
<rickNOSPAMn...@NOSPAMcomcast.net> 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
>
> <RJQ...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is RowHeight=0 the same as Hidden Michelle Microsoft Excel Misc 4 22nd Feb 2010 02:02 PM
Find 4.75 and Replace with 12.75 ( Rowheight ) Steved Microsoft Excel Misc 2 5th Jun 2008 02:34 AM
Listbox Rowheight DS Microsoft Access Forms 0 7th Mar 2006 03:54 PM
TableDef, RowHeight zamdrist@gmail.com Microsoft Access VBA Modules 5 13th Oct 2005 06:01 PM
RowHeight Macro cdegar01 Microsoft Excel Misc 1 26th Jan 2004 09:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:14 PM.