Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #110500 > unrolled thread

Include ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher.

Started byjmslab@xs4all.nl
First post2018-03-04 23:23 -0800
Last post2018-03-07 13:46 +0100
Articles 2 — 2 participants

Back to article view | Back to microsoft.public.excel.programming


Contents

  Include ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher. jmslab@xs4all.nl - 2018-03-04 23:23 -0800
    Re: Include ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher. Claus Busch <claus_busch@t-online.de> - 2018-03-07 13:46 +0100

#110500 — Include ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher.

Fromjmslab@xs4all.nl
Date2018-03-04 23:23 -0800
SubjectInclude ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher.
Message-ID<8f422aaf-0b58-49fd-b2d5-d544945dface@googlegroups.com>
Dear all,

If somebody can help me out with a VBA :)
I have a sheet with several rows and the columns ABC.

1)
I'd like to include in all cells one ALT+ENTER (Only if there is text written in it !!). So all cells get then a new empty row in it.

2)
Then all cells actual row heights fit.

3)
On top of that I want to set the visible row height at 'actual rowheight' plus 6mm.


Regards and thanks,
    Johan

[toc] | [next] | [standalone]


#110501

FromClaus Busch <claus_busch@t-online.de>
Date2018-03-07 13:46 +0100
Message-ID<p7omub$4ef$1@dont-email.me>
In reply to#110500
Hi Johan,

Am Sun, 4 Mar 2018 23:23:11 -0800 (PST) schrieb jmslab@xs4all.nl:

> 1)
> I'd like to include in all cells one ALT+ENTER (Only if there is text written in it !!). So all cells get then a new empty row in it.
> 
> 2)
> Then all cells actual row heights fit.
> 
> 3)
> On top of that I want to set the visible row height at 'actual rowheight' plus 6mm.

try:

Sub Test()
Dim LRow As Long
Dim rngC As Range

LRow = Cells(Rows.Count, "ABC").End(xlUp).Row
For Each rngC In Range("ABC2:ABC" & LRow)
   If Not IsNumeric(rngC) Then rngC = rngC & Chr(10)
Next
Range("ABC2:ABC" & LRow).EntireRow.AutoFit
With Range("ABC1")
   .RowHeight = .RowHeight + (0.6 * 28.346456692913)
End With
End Sub


Regards
Claus B.
-- 
Windows10
Office 2016

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.excel.programming


csiph-web