Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

excel spread sheet 3

Status
Not open for further replies.

142846

Chemical
Jul 13, 2020
107
0
0
PL
hello

How to increase (for example 10 percent) all row height in excel? or for example to increase 8 unit for each row height. I have a lot of rows with different height.

appreciate for any respond.
 
Replies continue below

Recommended for you

In libreoffice spreadsheet, you can increase the row height by selecting the rows and stipulating the height. You might run openoffice, do the mod and see if it fits back in excel.

Rather than think climate change and the corona virus as science, think of it as the wrath of God. Feel any better?

-Dik
 
thanks a lot IRstuff for quick respond.
Actually my question return to excel row height autofit. In my opinion excel autofit default is very compact and there isn't any free space between rows.in the other hand when I increase or decrease font size the row height automatically increase or decrease. actually I want decreasing font size without decreasing row height. Is there a way to get what I want?
 
Code:
Sub ChangeRowHeight(Optional PctChg As Integer = 10, Optional IncDec As Boolean = True)
'increase/decrease row height by PctChg%  
'default to increase by 10%  
    With ActiveSheet.UsedRange.EntireRow
        If IncDec Then
            .RowHeight = .RowHeight * (1 + PctChg / 100)
        Else
            .RowHeight = .RowHeight * (1 - PctChg / 100)
        End If
    End With
End Sub

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
libreoffice is free... If it weren't for Win Bricscad... I'd be using Linux. Libreoffice also runs in Linux...

Rather than think climate change and the corona virus as science, think of it as the wrath of God. Feel any better?

-Dik
 
Just checking in libreoffice calc you can set the padding around values, top and bottom and sides so that it always provides a space of 0.7mm or whatever...

Rather than think climate change and the corona virus as science, think of it as the wrath of God. Feel any better?

-Dik
 
The above procedure only works if ALL rows have identical RowHeight value.

here's a version for varying row heights...
Code:
Sub ChangeRowHeight2(Optional PctChg As Integer = 10, Optional IncDec As Boolean = True)
'for rows with varying RowHeight
'increase/decrease row height by PctChg%  
'default to increase by 10%  
    Dim rRow As Range
    With ActiveSheet.UsedRange
        For Each rRow In Range(.Cells(1, 1), .Cells(.Rows.Count, 1))
            With rRow.EntireRow
                If IncDec Then
                    .RowHeight = .RowHeight * (1 + PctChg / 100)
                Else
                    .RowHeight = .RowHeight * (1 - PctChg / 100)
                End If
            End With
        Next
    End With
End Sub

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Skip, you're an animal (read as compliment).
I used to think I was an Excel expert until I joined this forum. Now I just read posts and feel a deep sense of humility.
 
I have been tutored for the past 2 decades at Tek-Tips.com, Eng-Tips sister site for all things computer, especially for me: Excel, Access, VBA, SQL, as I was a data analyst/programmer before I retired.

Thanx for the compliment. Grrrrrrrr🤓

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.
Back
Top