piecevcake
New Member
- Joined
- Mar 17, 2016
- Messages
- 3
Hello,
I have a sheet of downloaded email messages. Can anyone help with a macro to delete lines above the message body, in all the cells in that column? I have been searching for a long time, found a macro which will work on one cell, but can't get it to work on all the cells in the column.
I also need to remove empty lines within those same cells (so there is just 1 line break between text)
Thank you
The text copy pasted from the cells:
Subject:
[Ticket#...
From:
[sender
Date:
10/8/16 4.00 a.m.
To:
[recipient
[need to keep this line to end of the cell]Hi there...
======================
The macro I have got so far:
I have a sheet of downloaded email messages. Can anyone help with a macro to delete lines above the message body, in all the cells in that column? I have been searching for a long time, found a macro which will work on one cell, but can't get it to work on all the cells in the column.
I also need to remove empty lines within those same cells (so there is just 1 line break between text)
Thank you
The text copy pasted from the cells:
Subject:
[Ticket#...
From:
[sender
Date:
10/8/16 4.00 a.m.
To:
[recipient
[need to keep this line to end of the cell]Hi there...
======================
The macro I have got so far:
Code:
Sub C___DRAFT_REMOVE_1ST_8_LINES_IN_1_SELECTED_CELL_SingleSelectionCellOnly()
'SELECT CELL 1ST
'TO DO: make it repeat down through a multiple cell selection!(COLUMN TO END OF SHEET)
ary = Split(ActiveCell.Value, Chr(10))
t = ""
For I = 8 To UBound(ary)
t = t & Chr(10) & ary(I)
Next I
If Len(t) > 1 Then
t = Mid(t, 2)
Else
t = ""
End If
ActiveCell.Value = t
End Sub