Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 02-07-2019, 03:34 AM
Willby Willby is offline Windows 10 Office 2016
Novice
 
Join Date: Feb 2019
Posts: 1
Willby is on a distinguished road
Default Add white space between rows

I don't know of any native way to add white space between rows, but this simple macro does the job. It prompts the user to input a value for the extra space (which is created by increasing the row height of each row by a certain amount greater than the 'auotfitted' height):



Code:
#Sub RowHeight()

Dim rngRows, rngCell As Range
Dim h, n As Single

n = InputBox("Space to add:", "Add space between rows", 15)

Set rngRows = Range(Range("B2"), Range("B2").End(xlDown))
rngRows.Rows.AutoFit

For Each rngCell In rngRows
    h = rngCell.Height
    rngCell.RowHeight = h + n
Next


 End Sub#
Edit Mod : related to http://www.msofficeforums.com/excel/...text-cell.html

Last edited by Pecoflyer; 02-08-2019 at 08:02 AM.
Reply With Quote
  #2  
Old 02-07-2019, 07:29 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 436
ArviLaanemets will become famous soon enoughArviLaanemets will become famous soon enough
Default

Instead letting Excel to decide, when start with new row, you can force the new row with Alt+Enter. Doing so twice gives you additional empty row between text rows. I have used this to group entered text sometimes.
Reply With Quote
  #3  
Old 02-08-2019, 12:52 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Windows 7 64bit Office 2010 64bit
Moderator
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,386
Pecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of light
Default

@Willby
Do not post a question in the thread of another member -- start your own thread.

If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
I will create a thread for you this time
__________________
Problem solved ? Let others know by clicking " Thread Tools" then " Mark thread as solved".( This can be undone if need be)
Want to thank for the help received ? Click the scales symbol in the upper right corner of a post from the person you want to thank.
Reply With Quote
  #4  
Old 02-08-2019, 12:56 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Windows 7 64bit Office 2010 64bit
Moderator
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,386
Pecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of lightPecoflyer is a glorious beacon of light
Default

@Arvi
Please don't encourage hijacking by following up

Thank you
__________________
Problem solved ? Let others know by clicking " Thread Tools" then " Mark thread as solved".( This can be undone if need be)
Want to thank for the help received ? Click the scales symbol in the upper right corner of a post from the person you want to thank.
Reply With Quote
  #5  
Old 02-08-2019, 06:33 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 436
ArviLaanemets will become famous soon enoughArviLaanemets will become famous soon enough
Default

Quote:
Originally Posted by Pecoflyer View Post
Please don't encourage hijacking by following up
I thought I was answering to jdorin's thread! Now I checked dates and did see it was an antique one!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
white letter instead off space merletcollege Word 4 09-27-2018 05:04 AM
Eliminate weird white space puff Word 7 03-12-2018 12:51 AM
Unwanted white space sassiebrat Word 2 10-03-2016 08:53 PM
Removed white space within same page. johnatanasoff Word 7 01-04-2016 07:44 AM
white space seeker62 Word 12 07-16-2013 09:54 PM


All times are GMT -7. The time now is 02:06 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft