Hi & welcome to the forum,

Try below code ... Data will pasted from cell [C15] which you can change
Sub test()

Dim a, c&

a = [A1].CurrentRegion
ReDim b(1 To UBound(a), 1 To UBound(a))
c = 0

For x = 1 To UBound(a)
   Select Case True
      Case a(x, 1) Like "Acc*"
         i = 1
         c = IIf(c = 0, 1, c + 3)
         b(i, c) = a(x, 1)
      Case a(x, 1) Like "Ref*"
         i = i + 1
         b(i, c) = a(x, 1)
      Case IsNumeric(a(x, 1))
         b(i + 1, c + 1) = a(x, 1)
      Case a(x, 1) Like "Saldo*"
         i = i + 1
         b(i, c) = a(x, 1)
   End Select
Next

[C15].Resize(UBound(a), UBound(b, 2)) = b

End Sub