Private Sub CommandButton1_Click()
Dim iRow As Integer, iCol As Integer, Dates
iRow = ComboBox1.ListIndex + 2
Dates = Range("A1:AZ1").Value2
For iCol = 1 To UBound(Dates, 2)
If Cells(1, iCol).Value = DateValue(ComboBox2.Text) Then
Cells(iRow, iCol) = Me.TextBox1.Value
Exit Sub
End If
Next iCol
End Sub