FredrikNilsen
New Member
- Joined
- Jan 25, 2021
- Messages
- 26
- Office Version
- 365
- 2019
- 2016
- 2013
- Platform
- Windows
I have a code to combine data from two columns: E and F.
I have added the "Columns("E").Font.Bold = True" part to make the current data in E bold, but when I run it, it also makes the new data from F bold, which it should not. Any suggestions?
VBA Code:
Sub MoveData()
Columns("E").Font.Bold = True
Application.ScreenUpdating = False
For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
Range("A" & i, "E" & i).VerticalAlignment = xlVAlignTop
Range("E" & i) = Range("E" & i) & vbLf & Range("F" & i).Value
Range("F" & i).ClearContents
Next
Application.ScreenUpdating = True
End Sub
I have added the "Columns("E").Font.Bold = True" part to make the current data in E bold, but when I run it, it also makes the new data from F bold, which it should not. Any suggestions?