My excel macro is currently concatenating two columns, unit and number. The numbers are pulled up based on a ID and sometimes the number I wish to concatanate the unit with might not be present for that specific ID. I am using find last row, but that does not work in some scenarios as the number I want to concatanate with the unit only starts on row 6, sometimes row 8, but it will at least start on row 2. Row 1 contains the title.
I want to ignore the empty rows, and without giving it a range to look up to row 100 for example because I might have more than 100 rows sometimes. 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