I have a tool that contains a list of all employees and their associated stamp number. Many of the employees have more than one stamp and so we type in multiple values in the cell.
Some people just enter the stamp number with several spaces in between but some people use the "ALT+ENTER" when entering stamps. The issue with the "ALT+ENTER" is that when I go to the dropdown box for that cell, the paragraph symbol is showing up in the selection.
Also, the tool does not let you just type in one of the stamps (assuming there is more than one in a cell) and search that way.
Any ideas? Let me know if you need more information.
Some people just enter the stamp number with several spaces in between but some people use the "ALT+ENTER" when entering stamps. The issue with the "ALT+ENTER" is that when I go to the dropdown box for that cell, the paragraph symbol is showing up in the selection.
Also, the tool does not let you just type in one of the stamps (assuming there is more than one in a cell) and search that way.
Any ideas? Let me know if you need more information.
Code:
Private Sub ComboBox23_DropButt*******()
Values = ComboBox23.Value
ComboBox23.Clear
Call InitVars
MatrixTab.Range("A4", MatrixTab.Cells(LastRow, LastColumn)).Sort key1:=MatrixTab.Range("D4:D" & LastRow), Order1:=xlAscending, Header:=xlNo
For x = 4 To LastRow
If ActiveSheet.Shapes("Check Box 4").ControlFormat.Value = 1 And ActiveSheet.Shapes("Check Box 5").ControlFormat.Value <> 1 Then
If MatrixTab.Cells(x, 2).Value = "Y" Then
ComboBox23.AddItem MatrixTab.Cells(x, 4).Value
If MatrixTab.Cells(x, 5).Value <> "" Then
ComboBox23.AddItem MatrixTab.Cells(x, 5).Value
Else
End If
Else
End If
ElseIf ActiveSheet.Shapes("Check Box 5").ControlFormat.Value = 1 And ActiveSheet.Shapes("Check Box 4").ControlFormat.Value <> 1 Then
If MatrixTab.Cells(x, 2).Value = "N" Then
ComboBox23.AddItem MatrixTab.Cells(x, 4).Value
If MatrixTab.Cells(x, 5).Value <> "" Then
ComboBox23.AddItem MatrixTab.Cells(x, 5).Value
Else
End If
Else
End If
ElseIf ActiveSheet.Shapes("Check Box 4").ControlFormat.Value = 1 And ActiveSheet.Shapes("Check Box 5").ControlFormat.Value = 1 Then
ComboBox23.AddItem MatrixTab.Cells(x, 4).Value
If MatrixTab.Cells(x, 5).Value <> "" Then
ComboBox23.AddItem MatrixTab.Cells(x, 5).Value
Else
End If
Else
ComboBox23.AddItem MatrixTab.Cells(x, 4).Value
If MatrixTab.Cells(x, 5).Value <> "" Then
ComboBox23.AddItem MatrixTab.Cells(x, 5).Value
Else
End If
End If
Next
ComboBox23.Value = Values
Stamp = ComboBox23.Value
End Sub