You do not need VBA for this. An array formula works fine:
=TOCOL(Range,1,FALSE)
You can read about TOCOL(array, [ignore], [scan_by_column]) function.
Here I am transposing the data to a single column, while ignoring blank cells (it includes everything by default) and scanning by rows (FALSE is the default behavior but I wanted to be explicit).
If what you really want is to get the unique rows transposed/flattened, then:
=TOCOL(UNIQUE(Range),1)
If you must use VBA, then we can create our own function mimicking TOCOL() (although that's absolutely not necessary):
Function TransposePayroll(inputRange As Range)
Dim result() As Variant, count As Long, i As Long, j As Long
ReDim result(0 To inputRange.Rows.count * inputRange.Columns.count - 1)
count = 0
For i = 1 To inputRange.Rows.count
For j = 1 To inputRange.Columns.count
If inputRange.Cells(i, j).Value <> "" Then
result(count) = inputRange.Cells(i, j).Value
count = count + 1
End If
Next j
Next i
ReDim Preserve result(0 To count - 1)
TransposePayroll = Application.Transpose(result)
End Function
or if you want the unique rows only, same as TOCOL(UNIQUE()):
Function TransposePayroll_Unique(inputRange As Range)
Dim dict As Object, result() As Variant, rowKey As String
Dim i As Long, j As Long, count As Long
Set dict = CreateObject("Scripting.Dictionary")
For i = 1 To inputRange.Rows.count
rowKey = ""
For j = 1 To inputRange.Columns.count
rowKey = rowKey & "|" & inputRange.Cells(i, j).Value
Next j
If Not dict.Exists(rowKey) Then
dict.Add rowKey, i
End If
Next i
count = 0
For Each Key In dict.Keys
i = dict(Key)
For j = 1 To inputRange.Columns.count
If inputRange.Cells(i, j).Value <> "" And _
inputRange.Cells(i, j).Value <> 0 Then
count = count + 1
End If
Next j
Next
If count = 0 Then
UniqueRowsFlattened = ""
Exit Function
End If
ReDim result(1 To count, 1 To 1)
count = 1
For Each Key In dict.Keys
i = dict(Key)
For j = 1 To inputRange.Columns.count
If inputRange.Cells(i, j).Value <> "" And _
inputRange.Cells(i, j).Value <> 0 Then
result(count, 1) = inputRange.Cells(i, j).Value
count = count + 1
End If
Next j
Next
TransposePayroll_Unique = result
End Function

Bonus:
If you simply have the rows and they're not actually repeating, but you want them to be repeated, here's a formula to get that:
=DROP(REDUCE("",SEQUENCE(ROWS(Range)),LAMBDA(acc,r,VSTACK(acc,REPT(FILTER(INDEX(Range,r,0),INDEX(Range,r,0)<>""),SEQUENCE(COUNTA(INDEX(Range,r,0)),,1,0))))),1)

Then you can use any of the proposed functions above (you'd want to use 3 for [ignore] within TOCOL to ignore both empty and error cells).