Try this version
Sub Test()
Dim txt As String, prevVar As String, f As Integer, iRow As Long
With Sheet1
prevVar = .Cells(2, 1)
txt = .Cells(2, 1) & ":" & vbCrLf & " " & .Cells(2, 3) & ": " & .Cells(2, 2) & vbCrLf
For iRow = 3 To WorksheetFunction.CountA(.Range("A:A"))
If prevVar <> .Cells(iRow, 1) Then
prevVar = .Cells(iRow, 1)
txt = txt & vbCrLf & prevVar & ":" & vbCrLf & " " & .Cells(iRow, 3) & ": " & .Cells(iRow, 2) & vbCrLf
Else
txt = txt & Space(2) & .Cells(iRow, 3) & ": " & .Cells(iRow, 2) & vbCrLf
End If
Next iRow
End With
f = FreeFile
Open ThisWorkbook.Path & "\Output.yml" For Output As #f
Print #f, txt
Close #f
End Sub