I have a formula that doesn't quite seem to work. First I tried to make a formula to match the text in row 4 and then input the text from another box in a row below that. Does it matter if it is merged?
here is the code so far:
Private Sub SubmitButton_Click()
Dim emptyRow As Long
Dim emptyCol As Long
Dim Res As Variant
With Sheet2
Res = Application.Match(Roomnum.Value, .Rows(4), 0)
If Not IsError(Res) Then
emptyRow = .Cells(Rows.Count, 1).End(xlUp).Row + 1
Else
emptyRow = .Cells(Rows.Count, 1).End(xlUp).Row + 1
.Range("C" & emptyRow).Value = Credittxt.Value
End If
End With
End Sub
Bookmarks