ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   create formula showing row height in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/58748-create-formula-showing-row-height-cell.html)

Greg1094

create formula showing row height in a cell
 
In a large spreadsheet, I want to be able to quickly see the row height of
each row. My report calls for three possible heights depending on the
purpose of that row. How can I create a formula that will show the height of
each row?

Bob Umlas

create formula showing row height in a cell
 
Create a name, like RowH, and, assuming A1 is active when you define the
name, define it as =Get.Cell(17,Sheet1!a1)
(keep the reference relative (no "$")
Now, enter =RowH in a cell and the rowheight will be given. If the row
height changes, you will have to manually recalculate via ctrl/alt/F9.
Bob Umlas
Excel MVP

"Greg1094" wrote in message
...
In a large spreadsheet, I want to be able to quickly see the row height of
each row. My report calls for three possible heights depending on the
purpose of that row. How can I create a formula that will show the height

of
each row?




Greg1094

create formula showing row height in a cell
 
This works perfectly. Thank you very much.

"Bob Umlas" wrote:

Create a name, like RowH, and, assuming A1 is active when you define the
name, define it as =Get.Cell(17,Sheet1!a1)
(keep the reference relative (no "$")
Now, enter =RowH in a cell and the rowheight will be given. If the row
height changes, you will have to manually recalculate via ctrl/alt/F9.
Bob Umlas
Excel MVP

"Greg1094" wrote in message
...
In a large spreadsheet, I want to be able to quickly see the row height of
each row. My report calls for three possible heights depending on the
purpose of that row. How can I create a formula that will show the height

of
each row?





PeterAtherton

create formula showing row height in a cell
 


"Greg1094" wrote:

In a large spreadsheet, I want to be able to quickly see the row height of
each row. My report calls for three possible heights depending on the
purpose of that row. How can I create a formula that will show the height of
each row?


Alternativley, use a custom function

Function CellHeight(Optional cell)

If IsMissing(cell) Then
CellHeight = ActiveCell.RowHeight
Else
CellHeight = cell.RowHeight
End If
End Function

CellHeight() returns the height of the active cell and CellHeight(G17)
returns the height of row 17.

Function to be copied into a Worksheet module (Alt + F11, Insert Module)
To use it in more workbooks copy it into Your Personal Workbook.

Regards
Peter




All times are GMT +1. The time now is 01:36 PM.

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