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


Groups > microsoft.public.excel.programming > #110501

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

From Claus Busch <claus_busch@t-online.de>
Newsgroups microsoft.public.excel.programming
Subject Re: Include ALT+ENTER on each cell in all rows in column ABC -and- Set actual rowheight 6mm higher.
Date 2018-03-07 13:46 +0100
Organization A noiseless patient Spider
Message-ID <p7omub$4ef$1@dont-email.me> (permalink)
References <8f422aaf-0b58-49fd-b2d5-d544945dface@googlegroups.com>

Show all headers | View raw


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

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web