You could have left your attachment in, it would have been useful.
A user-defined function solution.
Array-enter it (use Ctrl+Shift+Enter, not just Enter, when committing the formula to the sheet). Do this with all 4 cells selected as you enter the formula. It's not limited to 4 cells, you can have 8 cells giving you additionally ST3, ET3, ST4, ET4, or as many as you want.
The formula in the attached is:
=blah(A1:J2)
The code for the udf is (and I'm sure it could be shorter):
Code:
Function blah(myRng)
Dim zz()
yy = myRng.Value
ReDim zz(1 To UBound(yy, 2) + 1)
idx = 1
For c = LBound(yy, 2) To UBound(yy, 2)
Select Case c
Case 1
If yy(2, c) <> 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
If yy(2, c + 1) = 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
End If
End If
Case UBound(yy, 2)
If yy(2, c) <> 0 And yy(2, c - 1) = 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
End If
If yy(2, c) <> 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
End If
Case Else
If yy(2, c) <> 0 Then
If yy(2, c - 1) = 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
End If
If yy(2, c + 1) = 0 Then
zz(idx) = yy(1, c)
idx = idx + 1
End If
End If
End Select
Next c
For i = idx To UBound(zz)
zz(i) = "-"
Next i
blah = zz
End Function