Hello,
I have this vba code that select 2 different columns and splits out the text to next row in each cell - works fine (its not the cleanest of vba code) but for the range V9, where the data is split to next row i seem to end up with a space before the date
here is the code:
Sub Breakpoint_reset()
'******************************************************************************
'** Cleans up report and removes the "BR" element which is a key identifier **
'** to format the report **
'******************************************************************************
Dim rngCell As Range
Range("T9", Range("t10000").End(xlUp)).Select
With Selection
For Each rngCell In Selection
rngCell.Value = Replace(rngCell, "<br />", vbLf)
Next
End With
Range("V9", Range("V10000").End(xlUp)).Select
With Selection
For Each rngCell In Selection
rngCell.Value = Replace(rngCell, "<br />", vbLf)
Next
End With
Range("A9").Select
for Example, if the <br /> exists it will move to the next line in the cell.:
Expected output from the cell
21.01.2022 this is a message
01.12.201 refer to new note
but i seem to be getting this output (with a space)
21.01.2022 this is a message
(space here)01.12.201 refer to new note
I've checked the data - and no space exists, am i missing something?
thanks
FWIZ
I have this vba code that select 2 different columns and splits out the text to next row in each cell - works fine (its not the cleanest of vba code) but for the range V9, where the data is split to next row i seem to end up with a space before the date
here is the code:
Sub Breakpoint_reset()
'******************************************************************************
'** Cleans up report and removes the "BR" element which is a key identifier **
'** to format the report **
'******************************************************************************
Dim rngCell As Range
Range("T9", Range("t10000").End(xlUp)).Select
With Selection
For Each rngCell In Selection
rngCell.Value = Replace(rngCell, "<br />", vbLf)
Next
End With
Range("V9", Range("V10000").End(xlUp)).Select
With Selection
For Each rngCell In Selection
rngCell.Value = Replace(rngCell, "<br />", vbLf)
Next
End With
Range("A9").Select
for Example, if the <br /> exists it will move to the next line in the cell.:
Expected output from the cell
21.01.2022 this is a message
01.12.201 refer to new note
but i seem to be getting this output (with a space)
21.01.2022 this is a message
(space here)01.12.201 refer to new note
I've checked the data - and no space exists, am i missing something?
thanks
FWIZ