Hello good day
I want to create the number (According to the value of g1) in column A in the last line by using the button
If there is already data in column a, I want to send a message that this number is available and not allow it to be created
And if it is possible for you to select the same repeated line and show it ,so that I can change its value right away
Thanks
I want to create the number (According to the value of g1) in column A in the last line by using the button
If there is already data in column a, I want to send a message that this number is available and not allow it to be created
And if it is possible for you to select the same repeated line and show it ,so that I can change its value right away
Thanks
VBA Code:
Sub commandbutton_clickl()
Dim i As Long
Dim Sh As Worksheet
Set Sh = ThisWorkbook.Sheets("sheet1")
Set EvalRange = Range("A:a")
Dim iRow As Integer
iRow = Sh.cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Sh.Range("a" & iRow).Value = Range("g1").Value
If Not IsError(i = WorksheetFunction.Match(Range("g1").Value, Range("A:A"), 0)) Then
i = WorksheetFunction.Match(Range("g1").Value, Range("A:A"), 0)
cells(i + 0, 2).Activate
Else
End If
End Sub