What i am trying to achieve is to list two ranges of cells in to seperate colums.
But to only include non-emply cells from c6:j6.
However the C5:J5 range is always popualted, this must also be filtered by the empty cells in range c6:j6.
So in the end i might have: Col 1 = c6, e6, and j6. And col 2 = c5, e5, and j5
So far i have the following code.
ListBox1.ColumnCount = 2
Set rng = ActiveSheet.Range("c6:j6")
Set run = ActiveSheet.Range("c5:j5")
For Each c In run
For Each cell In rng
If Not IsEmpty(cell) Then
ListBox1.AddItem c.Value
End If
Next
Next
For Each cell In rng
If Not IsEmpty(cell) Then
ListBox1.AddItem cell.Value
End If
Next
any help appreciated
Bookmarks