Hi
I have a huge list with staff numbers in the workbook sheet1 range from column A 3 to a (unknown the maximum). Which data around 1500 named list (just a numeric the staff no I need to validating who when attendance the general meeting in the main hall, who’s when entrance the room must to shown staff badge, So I have a thing if excel can facility with Input Box to entered the staff numbers, than” value “Y” to put in columns “B when both Input & list are matched.

But I not sure that’s can do or not, hope here’s who expert can help me more,
Thanks very much,

Hi,

Try the below coding:

Sub attendance()
Dim i, j As Integer
Dim inp As Integer
For i = 1 To 65536
If Sheet2.Cells(i, 1) = "" Then
i = i - 1
Exit For
End If
Next
inp = InputBox("Enter the Staff Number to Check?", "Check Staff Number")
For j = 2 To i
If Sheet2.Cells(j, 1) = inp Then
Sheet2.Cells(j, 2) = "Y"
Exit Sub
End If
Next
End Sub

Have a Nice day

:) Shailaja:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.