Now, my Excel macro is concatenating the unit and number columns. The numbers are retrieved based on an ID, and occasionally the number I want to combine the unit with may not be available for that particular ID. The number I want to concatenate with the unit only starts on row 6, occasionally on row 8, but it will at least start on row 2. I am using find last row, but that does not always work. The title appears on row 1.
Without giving it a range to look up to, say, row 100 because I occasionally have more than 100 rows, I want it to disregard the empty rows. The code below is what I currently have and works if the column is fully populated until the end.
rowEmpty = 2
Do While IsEmpty(ws_Export.cells(rowEmpty, 9)) = False
rowEmpty = rowEmpty + 1
Loop
'rowEmpty is now set as the first empty row (sets the range of the table)
'Add units within the same cell as the shunt
For s = 2 To rowEmpty - 1
cells(s, 9) = cells(s, 9) & " " & cells(s, 8)
Next s