H o l a:
Te anexo la macro del formulario
Private Sub CommandButton1_Click()
'Por.Dante Amor
'
If TextBox1 = "" Or TextBox2 = "" Then
MsgBox "Completa la información"
Exit Sub
End If
'
Set h = Sheets("insumos")
agregado = False
uc = h.Cells(3, Columns.Count).End(xlToLeft).Column
col = uc + 1
For j = 5 To uc Step 2 'empieza en la columna "E"
Select Case StrComp(h.Cells(3, j), TextBox2, vbTextCompare)
Case 0, 1
col = j - 1
Exit For
End Select
Next
h.Columns("F:G").Copy
h.Cells(1, col).Insert Shift:=xlToRight
uf = h.Cells(Rows.Count, col).End(xlUp).Row
h.Range(h.Cells(10, col), h.Cells(uf, col)).ClearContents
h.Cells(4, col) = ""
h.Cells(2, col) = TextBox1
h.Cells(2, col) = TextBox1
h.Cells(3, col + 1) = TextBox2
'
uc = h.Cells(1, Columns.Count).End(xlToLeft).Column
h.[D1] = 4
h.[E1] = 5
h.Range("D1:E1").AutoFill Destination:=h.Range("D1", h.Cells(1, uc)), Type:=xlFillDefault
MsgBox "Nombre insertado", vbInformation
End Sub
R ecuerda cambiar la valoración de la respuesta. G r a c i a s