I have the following macro, which takes a sparse set of data and copies the only entry from each row into the left-most column. Example of data
I am hoping someone could rewrite this macro into one that will work with the same data in LibreOffice.
Sub Macro1()
Dim rng As Range
Set rng = Selection
For Each row In rng.Rows
For Each cell In row.Cells
If cell <> "" Then
Debug.Print cell
row.Cells(1) = cell
End If
Next
Next
End Sub
Example of data