Hi,
I want to add extra spacing (one blank line space) should be created after the text. This would allow clean visual effect before the start of the new row.
Is it possible?
Hi,
I want to add extra spacing (one blank line space) should be created after the text. This would allow clean visual effect before the start of the new row.
Is it possible?
I would advice against adding any extra spaces at the start or end of text, as could cause problems later if you need to use formulas referencing those cells.
Not sure what you mean by "This would allow clean visual effect before the start of the new row." though?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
This macro will add a blank space after a text, which may or may not be what you asked / wished for.
AlfSub AddBlnk() Dim cell As Range For Each cell In Range("B11:B15") If IsNumeric(cell) = False And IsError(cell) = False Then cell = cell & " " End If Next End Sub
Hi, if you mean an extra blank line, then try this where the code will run through each textvalue in column A:
Kind regards,Sub test() Dim rng As Range, c As Range With Columns("A") 'change range here On Error Resume Next Set rng = .SpecialCells(xlCellTypeConstants, xlTextValues) On Error GoTo 0 If Not rng Is Nothing Then For Each c In rng c.Value = Trim$(c.Value) & Chr(10) 'add extra blank line Next c End If End With End Sub
berlan
Last edited by berlan; 04-11-2015 at 05:44 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks