Hi, I am trying to write a program which gets data from a table, where column A contains names and column B contains qty. It should check for any cell under column B that is not zero (and skip when zero), then capture the value and the corresponding value in column A in the format "X units of ABC / ", and then go on to check for other non-zero cells.
The result should look like 2 units of ABC / 3 units of ASDF...

However, below code only return the last item with non-zero value in the table. i.e. 3 units of ASDF in the case of above example.

Can anyway enlighten me on this? Thanks!!!

For m = 1 To Range("A:A").Cells.SpecialCells(xlCellTypeConstants).Count

If ActiveCell.Value = 0 Then
ActiveCell.Offset(1).Select

Else

ship = ship & ActiveCell.Value & " units of " & ActiveCell.Offset(, -1).Value & " / "

End If

ActiveCell.Offset(1).Select

Next m