Getting Excel Object Code to work with a UserForm

mdshields

New Member
Joined
Jun 30, 2016
Messages
33
I took over a workbook that has all of the coding done in Sheet1. It was originally made so the author could input his search queries on the worksheet and return results. I'd like to take the code and put a UserForm in front of it to allow for a more intuitive experience for other users besides the author.

I've tried having a UserForm that just takes the values entered into the textboxes and inputs them to their respective cells on the sheet but the results won't update until I've closed the UserForm.

My question is how to get the sheet to update based on the values entered into the UserForm without having to unload the UserForm. I would then be taking the results and displaying them in a ListBox but I need the results to update correctly before I can do that. I've attached the code that's in the Sheet1 Object.

Code:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'ACTIVATION MACROS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Worksheet_Activate()
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

    Sheets("Hob Cutters").Range("B2").Select
        Call FILTER1

Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'INPUT FUNCTIONS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'LAST ROW
    Private Function LastRow() As Double
        LastRow = Range("B10").End(xlDown).Row
    End Function
'CURRENT ROW
    Private Function CURRENT_ROW() As Double
        CURRENT_ROW = ActiveCell.Row
    End Function


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'INPUT CALCULATIONS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Worksheet_Change(ByVal Target As Range)
   
   On Error GoTo Terminate
   
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'FUNCTION
If Not Intersect(Target, Me.Range("B2")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("B2") = 1 Then UserForm1.Show
Application.EnableEvents = True
End If

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'FILTERING
If Not Intersect(Target, Me.Range("B4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("C4").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("C3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("C3") = 0 Then Sheets("Hob Cutters").Range("C5") = 0
        If Sheets("Hob Cutters").Range("C3") > 0 Then Sheets("Hob Cutters").Range("C5") = Sheets("Hob Cutters").Range("C3")
    Sheets("Hob Cutters").Range("C5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("C5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("D3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("D3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("D3") = 0 Then Sheets("Hob Cutters").Range("D5") = 0
        If Sheets("Hob Cutters").Range("D3") > 0 Then Sheets("Hob Cutters").Range("D5") = Sheets("Hob Cutters").Range("D3")
    Sheets("Hob Cutters").Range("D5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("D5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("E3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("E3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("E3") = 0 Then Sheets("Hob Cutters").Range("E5") = 0
        If Sheets("Hob Cutters").Range("E3") > 0 Then Sheets("Hob Cutters").Range("E5") = Sheets("Hob Cutters").Range("E3")
    Sheets("Hob Cutters").Range("E5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("E5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("F3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("F3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("F3") = 0 Then Sheets("Hob Cutters").Range("F5") = 0
        If Sheets("Hob Cutters").Range("F3") > 0 Then Sheets("Hob Cutters").Range("F5") = Sheets("Hob Cutters").Range("F3")
    Sheets("Hob Cutters").Range("F5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("F5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("G3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("G3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("G3") = 0 Then Sheets("Hob Cutters").Range("G5") = 0
        If Sheets("Hob Cutters").Range("G3") > 0 Then Sheets("Hob Cutters").Range("G5") = Sheets("Hob Cutters").Range("G3")
    Sheets("Hob Cutters").Range("G5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("G5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("H4").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("H4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("I4").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("I4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("J3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("J3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("J3") = 0 Then Sheets("Hob Cutters").Range("J5") = 0
        If Sheets("Hob Cutters").Range("J3") > 0 Then Sheets("Hob Cutters").Range("J5") = Sheets("Hob Cutters").Range("J3")
    Sheets("Hob Cutters").Range("J5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("J5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("K3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("K3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("K3") = 0 Then Sheets("Hob Cutters").Range("K5") = 0
        If Sheets("Hob Cutters").Range("K3") > 0 Then Sheets("Hob Cutters").Range("K5") = Sheets("Hob Cutters").Range("K3")
    Sheets("Hob Cutters").Range("K5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("K5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("L3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("L3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("L3") = 0 Then Sheets("Hob Cutters").Range("L5") = 0
        If Sheets("Hob Cutters").Range("L3") > 0 Then Sheets("Hob Cutters").Range("L5") = Sheets("Hob Cutters").Range("L3")
    Sheets("Hob Cutters").Range("L5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("L5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("M3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("M3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("M3") = 0 Then Sheets("Hob Cutters").Range("M5") = 0
        If Sheets("Hob Cutters").Range("M3") > 0 Then Sheets("Hob Cutters").Range("M5") = Sheets("Hob Cutters").Range("M3")
    Sheets("Hob Cutters").Range("M5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("M5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("N3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("N3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("N3") = 0 Then Sheets("Hob Cutters").Range("N5") = 0
        If Sheets("Hob Cutters").Range("N3") > 0 Then Sheets("Hob Cutters").Range("N5") = Sheets("Hob Cutters").Range("N3")
    Sheets("Hob Cutters").Range("N5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("N5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("O3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("O3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("O3") = 0 Then Sheets("Hob Cutters").Range("O5") = 0
        If Sheets("Hob Cutters").Range("O3") > 0 Then Sheets("Hob Cutters").Range("O5") = Sheets("Hob Cutters").Range("O3")
    Sheets("Hob Cutters").Range("O5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("O5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("P3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("P3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("P3") = 0 Then Sheets("Hob Cutters").Range("P5") = 0
        If Sheets("Hob Cutters").Range("P3") > 0 Then Sheets("Hob Cutters").Range("P5") = Sheets("Hob Cutters").Range("P3")
    Sheets("Hob Cutters").Range("P5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("P5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("Q3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("Q3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("Q3") = 0 Then Sheets("Hob Cutters").Range("Q5") = 0
        If Sheets("Hob Cutters").Range("Q3") > 0 Then Sheets("Hob Cutters").Range("Q5") = Sheets("Hob Cutters").Range("Q3")
    Sheets("Hob Cutters").Range("Q5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("Q5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("R3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("R3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("R3") = 0 Then Sheets("Hob Cutters").Range("R5") = 0
        If Sheets("Hob Cutters").Range("R3") > 0 Then Sheets("Hob Cutters").Range("R5") = Sheets("Hob Cutters").Range("R3")
    Sheets("Hob Cutters").Range("R5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("R5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("S3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("S3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("S3") = 0 Then Sheets("Hob Cutters").Range("S5") = 0
        If Sheets("Hob Cutters").Range("S3") > 0 Then Sheets("Hob Cutters").Range("S5") = Sheets("Hob Cutters").Range("S3")
    Sheets("Hob Cutters").Range("S5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("S5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("T3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("T3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("T3") = 0 Then Sheets("Hob Cutters").Range("T5") = 0
        If Sheets("Hob Cutters").Range("T3") > 0 Then Sheets("Hob Cutters").Range("T5") = Sheets("Hob Cutters").Range("T3")
    Sheets("Hob Cutters").Range("T5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("T5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("U3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("U3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("U3") = 0 Then Sheets("Hob Cutters").Range("U5") = 0
        If Sheets("Hob Cutters").Range("U3") > 0 Then Sheets("Hob Cutters").Range("U5") = Sheets("Hob Cutters").Range("U3")
    Sheets("Hob Cutters").Range("U5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("U5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("V3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("V3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("V3") = 0 Then Sheets("Hob Cutters").Range("V5") = 0
        If Sheets("Hob Cutters").Range("V3") > 0 Then Sheets("Hob Cutters").Range("V5") = Sheets("Hob Cutters").Range("V3")
    Sheets("Hob Cutters").Range("V5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("V5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("W3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("W3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("W3") = 0 Then Sheets("Hob Cutters").Range("W5") = 0
        If Sheets("Hob Cutters").Range("W3") > 0 Then Sheets("Hob Cutters").Range("W5") = Sheets("Hob Cutters").Range("W3")
    Sheets("Hob Cutters").Range("W5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("W5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("X3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("X3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("X3") = 0 Then Sheets("Hob Cutters").Range("X5") = 0
        If Sheets("Hob Cutters").Range("X3") > 0 Then Sheets("Hob Cutters").Range("X5") = Sheets("Hob Cutters").Range("X3")
    Sheets("Hob Cutters").Range("X5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("X5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("Y3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("Y3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("Y3") = 0 Then Sheets("Hob Cutters").Range("Y5") = 0
        If Sheets("Hob Cutters").Range("Y3") > 0 Then Sheets("Hob Cutters").Range("Y5") = Sheets("Hob Cutters").Range("Y3")
    Sheets("Hob Cutters").Range("Y5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("Y5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("Z3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("Z3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("Z3") = 0 Then Sheets("Hob Cutters").Range("Z5") = 0
        If Sheets("Hob Cutters").Range("Z3") > 0 Then Sheets("Hob Cutters").Range("Z5") = Sheets("Hob Cutters").Range("Z3")
    Sheets("Hob Cutters").Range("Z5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("Z5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AA3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AA3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AA3") = 0 Then Sheets("Hob Cutters").Range("AA5") = 0
        If Sheets("Hob Cutters").Range("AA3") > 0 Then Sheets("Hob Cutters").Range("AA5") = Sheets("Hob Cutters").Range("AA3")
    Sheets("Hob Cutters").Range("AA5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AA5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AB3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AB3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AB3") = 0 Then Sheets("Hob Cutters").Range("AB5") = 0
        If Sheets("Hob Cutters").Range("AB3") > 0 Then Sheets("Hob Cutters").Range("AB5") = Sheets("Hob Cutters").Range("AB3")
    Sheets("Hob Cutters").Range("AB5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AB5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AC3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AC3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AC3") = 0 Then Sheets("Hob Cutters").Range("AC5") = 0
        If Sheets("Hob Cutters").Range("AC3") > 0 Then Sheets("Hob Cutters").Range("AC5") = Sheets("Hob Cutters").Range("AC3")
    Sheets("Hob Cutters").Range("AC5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AC5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AD3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AD3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AD3") = 0 Then Sheets("Hob Cutters").Range("AD5") = 0
        If Sheets("Hob Cutters").Range("AD3") > 0 Then Sheets("Hob Cutters").Range("AD5") = Sheets("Hob Cutters").Range("AD3")
    Sheets("Hob Cutters").Range("AD5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AD5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AE3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AE3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AE3") = 0 Then Sheets("Hob Cutters").Range("AE5") = 0
        If Sheets("Hob Cutters").Range("AE3") > 0 Then Sheets("Hob Cutters").Range("AE5") = Sheets("Hob Cutters").Range("AE3")
    Sheets("Hob Cutters").Range("AE5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AE5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AF3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AF3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AF3") = 0 Then Sheets("Hob Cutters").Range("AF5") = 0
        If Sheets("Hob Cutters").Range("AF3") > 0 Then Sheets("Hob Cutters").Range("AF5") = Sheets("Hob Cutters").Range("AF3")
    Sheets("Hob Cutters").Range("AF5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AF5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AG3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AG3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AG3") = 0 Then Sheets("Hob Cutters").Range("AG5") = 0
        If Sheets("Hob Cutters").Range("AG3") > 0 Then Sheets("Hob Cutters").Range("AG5") = Sheets("Hob Cutters").Range("AG3")
    Sheets("Hob Cutters").Range("AG5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AG5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AH3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AH3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AH3") = 0 Then Sheets("Hob Cutters").Range("AH5") = 0
        If Sheets("Hob Cutters").Range("AH3") > 0 Then Sheets("Hob Cutters").Range("AH5") = Sheets("Hob Cutters").Range("AH3")
    Sheets("Hob Cutters").Range("AH5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AH5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AI3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AI3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AI3") = 0 Then Sheets("Hob Cutters").Range("AI5") = 0
        If Sheets("Hob Cutters").Range("AI3") > 0 Then Sheets("Hob Cutters").Range("AI5") = Sheets("Hob Cutters").Range("AI3")
    Sheets("Hob Cutters").Range("AI5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AI5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AJ4").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AJ4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AK3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AK3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AK3") = 0 Then Sheets("Hob Cutters").Range("AK5") = 0
        If Sheets("Hob Cutters").Range("AK3") > 0 Then Sheets("Hob Cutters").Range("AK5") = Sheets("Hob Cutters").Range("AK3")
    Sheets("Hob Cutters").Range("AK5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AK5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AL3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AL3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AL3") = 0 Then Sheets("Hob Cutters").Range("AL5") = 0
        If Sheets("Hob Cutters").Range("AL3") > 0 Then Sheets("Hob Cutters").Range("AL5") = Sheets("Hob Cutters").Range("AL3")
    Sheets("Hob Cutters").Range("AL5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AL5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AM3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AM3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AM3") = 0 Then Sheets("Hob Cutters").Range("AM5") = 0
        If Sheets("Hob Cutters").Range("AM3") > 0 Then Sheets("Hob Cutters").Range("AM5") = Sheets("Hob Cutters").Range("AM3")
    Sheets("Hob Cutters").Range("AM5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AM5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AN3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AN3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AN3") = 0 Then Sheets("Hob Cutters").Range("AN5") = 0
        If Sheets("Hob Cutters").Range("AN3") > 0 Then Sheets("Hob Cutters").Range("AN5") = Sheets("Hob Cutters").Range("AN3")
    Sheets("Hob Cutters").Range("AN5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AN5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AO3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AO3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AO3") = 0 Then Sheets("Hob Cutters").Range("AO5") = 0
        If Sheets("Hob Cutters").Range("AO3") > 0 Then Sheets("Hob Cutters").Range("AO5") = Sheets("Hob Cutters").Range("AO3")
    Sheets("Hob Cutters").Range("AO5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AO5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AP3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AP3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AP3") = 0 Then Sheets("Hob Cutters").Range("AP5") = 0
        If Sheets("Hob Cutters").Range("AP3") > 0 Then Sheets("Hob Cutters").Range("AP5") = Sheets("Hob Cutters").Range("AP3")
    Sheets("Hob Cutters").Range("AP5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AP5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AQ3").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AQ3")) Is Nothing Then
Application.EnableEvents = False
    If Sheets("Hob Cutters").Range("AQ3") = 0 Then Sheets("Hob Cutters").Range("AQ5") = 0
        If Sheets("Hob Cutters").Range("AQ3") > 0 Then Sheets("Hob Cutters").Range("AQ5") = Sheets("Hob Cutters").Range("AQ3")
    Sheets("Hob Cutters").Range("AQ5").Select
    Call FILTER1
Application.EnableEvents = True
End If
If Not Intersect(Target, Me.Range("AQ5")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AQ5").Select
    Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AR4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AS4").Select
    'Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AS4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AS4").Select
    'Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AT4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AT4").Select
    'Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AU4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AU4").Select
    'Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AV4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AV4").Select
    'Call FILTER1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not Intersect(Target, Me.Range("AW4")) Is Nothing Then
Application.EnableEvents = False
    Sheets("Hob Cutters").Range("AW4").Select
    'Call FILTER1
Application.EnableEvents = True
End If

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'GEAR PRESSURE ANGLE
If Not Intersect(Target, Me.Range("C10:C" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call PRESSURE_ANGLE1
    Call GENERATING_PITCH1
    Call GENERATING_MODULE1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'GEAR DIAMETRAL PITCH
If Not Intersect(Target, Me.Range("D10:D" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call PITCH1
    Call GENERATING_PITCH1
    Call GENERATING_MODULE1
Application.EnableEvents = True
End If
'GEAR MODULE
If Not Intersect(Target, Me.Range("E10:E" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call Module1
    Call GENERATING_PITCH1
    Call GENERATING_MODULE1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'GEAR SPLIT DIAMETRAL PITCH
If Not Intersect(Target, Me.Range("F10:F" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call PITCH2
Application.EnableEvents = True
End If
'GEAR SPLIT MODULE
If Not Intersect(Target, Me.Range("G10:G" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call MODULE2
Application.EnableEvents = True
End If

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'HOB PRESSURE ANGLE
If Not Intersect(Target, Me.Range("J10:J" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call GENERATING_PITCH1
    Call GENERATING_MODULE1
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB GENERATING PITCH
If Not Intersect(Target, Me.Range("K10:K" & LastRow)) Is Nothing Then
Application.EnableEvents = False
Application.EnableEvents = True
End If
'HOB GENERATING MODULE
If Not Intersect(Target, Me.Range("L10:L" & LastRow)) Is Nothing Then
Application.EnableEvents = False
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB RAMP LOCATION (INCH)
If Not Intersect(Target, Me.Range("N10:N" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call RAMP_LOCATION1
Application.EnableEvents = True
End If
'HOB RAMP LOCATION (METRIC)
If Not Intersect(Target, Me.Range("O10:O" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call RAMP_LOCATION2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB TOOTH THICKNESS (INCH)
If Not Intersect(Target, Me.Range("P10:P" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call TOOTH_THICKNESS1
Application.EnableEvents = True
End If
'HOB TOOTH THICKNESS (METRIC)
If Not Intersect(Target, Me.Range("Q10:Q" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call TOOTH_THICKNESS2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB ADDENDUM (INCH)
If Not Intersect(Target, Me.Range("R10:R" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call ADDENDUM1
Application.EnableEvents = True
End If
'HOB ADDENDUM (METRIC)
If Not Intersect(Target, Me.Range("S10:S" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call ADDENDUM2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB TIP RADIUS (INCH)
If Not Intersect(Target, Me.Range("T10:T" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call TIP_RADIUS1
Application.EnableEvents = True
End If
'HOB TIP RADIUS (METRIC)
If Not Intersect(Target, Me.Range("U10:U" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call TIP_RADIUS2
Application.EnableEvents = True
End If ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'FINISH STOCK PER TOOTH (INCH)
If Not Intersect(Target, Me.Range("V10:V" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call STOCK1
Application.EnableEvents = True
End If
'FINISH STOCK PER TOOTH (METRIC)
If Not Intersect(Target, Me.Range("W10:W" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call STOCK2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB PROTUBERANCE (INCH)
If Not Intersect(Target, Me.Range("X10:X" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call PROTUBERANCE1
Application.EnableEvents = True
End If
'HOB PROTUBERANCE (METRIC)
If Not Intersect(Target, Me.Range("Y10:Y" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call PROTUBERANCE2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB C' DIMENSION (INCH)
If Not Intersect(Target, Me.Range("Z10:Z" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call C_DIMENSION1
Application.EnableEvents = True
End If
'HOB C' DIMENSION (METRIC)
If Not Intersect(Target, Me.Range("AA10:AA" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call C_DIMENSION2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB B' DIMENSION (INCH)
If Not Intersect(Target, Me.Range("AC10:AC" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call B_DIMENSION1
Application.EnableEvents = True
End If
'HOB B' DIMENSION (METRIC)
If Not Intersect(Target, Me.Range("AD10:AD" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call B_DIMENSION2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB WHOLE DEPTH (INCH)
If Not Intersect(Target, Me.Range("AE10:AE" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call WHOLE_DEPTH1
Application.EnableEvents = True
End If
'HOB WHOLE DEPTH (METRIC)
If Not Intersect(Target, Me.Range("AF10:AF" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call WHOLE_DEPTH2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB ROOT RADIUS (INCH)
If Not Intersect(Target, Me.Range("AG10:AG" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call ROOT_RADIUS1
Application.EnableEvents = True
End If
'HOB ROOT RADIUS (METRIC)
If Not Intersect(Target, Me.Range("AH10:AH" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call ROOT_RADIUS2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB OUTSIDE DIAMETER (INCH)
If Not Intersect(Target, Me.Range("AL10:AL" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call OUTSIDE_DIAMETER1
Application.EnableEvents = True
End If
'HOB OUTSIDE DIAMETER (METRIC)
If Not Intersect(Target, Me.Range("AM10:AM" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call OUTSIDE_DIAMETER2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB OVERALL LENGTH (INCH)
If Not Intersect(Target, Me.Range("AN10:AN" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call OVERALL_LENGTH1
Application.EnableEvents = True
End If
'HOB OVERALL LENGTH (METRIC)
If Not Intersect(Target, Me.Range("AO10:AO" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call OVERALL_LENGTH2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB HOLE DIAMETER (INCH)
If Not Intersect(Target, Me.Range("AP10:AP" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call HOLE_DIAMETER1
Application.EnableEvents = True
End If
'HOB HOLE DIAMETER (METRIC)
If Not Intersect(Target, Me.Range("AQ10:AQ" & LastRow)) Is Nothing Then
Application.EnableEvents = False
    Call HOLE_DIAMETER2
Application.EnableEvents = True
End If
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
    Exit Sub
Terminate:
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
    End
End Sub
    

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'INPUT CALCULATION MACROS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'PRESSURE CONVERSIONS
Private Sub PRESSURE_ANGLE1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) = "" Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) = ""
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) > 0 And Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'PITCH CONVERSIONS
Private Sub PITCH1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) = 25.4 / Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub PITCH2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 6) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 7) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 6) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 7) = 25.4 / Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 6)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'MODULE CONVERSION
Private Sub Module1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) = 25.4 / Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub MODULE2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 7) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 6) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 7) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 6) = 25.4 / Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 7)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'GENERATING PITCH CONVERSION
Private Sub GENERATING_PITCH1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        Base = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) / Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) * R)
        Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 11) = Base * Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) * R)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
'NORMAL PITCH CONVERSION
Private Sub NORMAL_PITCH1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        Base = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 11) / Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) * R)
        Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 4) = Base * Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) * R)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'GENERATING MODULE CONVERSION
Private Sub GENERATING_MODULE1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        Base = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) * Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) * R)
        Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 12) = Base / Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) * R)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
'NORMAL MODULE CONVERSION
Private Sub NORMAL_MODULE1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        Base = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 12) * Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 10) * R)
        Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 5) = Base / Cos(Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 3) * R)
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'HOB RAMP LOCATION
Private Sub RAMP_LOCATION1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 14) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 15) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 14) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 15) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 14) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub RAMP_LOCATION2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 15) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 14) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 15) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 14) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 15) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB TOOTH THICKNESS
Private Sub TOOTH_THICKNESS1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 16) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 17) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 16) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 17) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 16) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub TOOTH_THICKNESS2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 17) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 16) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 17) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 16) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 17) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB ADDENDUM
Private Sub ADDENDUM1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 18) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 19) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 18) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 19) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 18) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub ADDENDUM2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 19) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 18) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 19) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 18) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 19) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB TIP RADIUS
Private Sub TIP_RADIUS1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 20) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 21) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 20) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 21) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 20) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub TIP_RADIUS2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 21) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 20) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 21) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 20) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 21) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
'FINISHED STOCK PER TOOTH
Private Sub STOCK1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 22) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 23) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 22) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 23) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 22) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub STOCK2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 23) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 22) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 23) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 22) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 23) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB PROTUBERANCE
Private Sub PROTUBERANCE1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 24) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 25) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 24) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 25) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 24) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub PROTUBERANCE2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 25) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 24) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 25) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 24) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 25) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB C' DIMENTION
Private Sub C_DIMENSION1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 26) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 27) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 26) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 27) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 26) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub C_DIMENSION2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 27) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 26) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 27) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 26) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 27) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB B' DIMENTION
Private Sub B_DIMENSION1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 29) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 30) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 29) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 30) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 29) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub B_DIMENSION2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 30) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 29) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 30) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 29) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 30) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB WHOLE DEPTH
Private Sub WHOLE_DEPTH1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 31) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 32) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 31) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 32) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 31) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub WHOLE_DEPTH2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 32) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 31) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 32) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 31) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 32) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB ROOT RADIUS
Private Sub ROOT_RADIUS1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 33) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 34) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 33) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 34) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 33) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub ROOT_RADIUS2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 34) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 33) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 34) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 33) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 34) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB OUTSIDE DIAMETER
Private Sub OUTSIDE_DIAMETER1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 38) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 39) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 38) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 39) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 38) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub OUTSIDE_DIAMETER2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 39) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 38) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 39) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 38) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 39) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB OVERALL LENGTH
Private Sub OVERALL_LENGTH1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 40) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 41) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 40) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 41) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 40) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub OVERALL_LENGTH2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 41) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 40) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 41) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 40) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 41) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'HOB HOLE DIAMETER
Private Sub HOLE_DIAMETER1()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 42) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 43) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 42) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 43) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 42) * 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub HOLE_DIAMETER2()
Application.EnableEvents = False
Application.ScreenUpdating = False
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 43) <= 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 42) = 0
        If Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 43) > 0 Then Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 42) = Sheets("HOB CUTTERS").Cells(CURRENT_ROW, 43) / 25.4
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'INPUT FILTER MACROS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub FILTER1()

   On Error GoTo Terminate

Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False

    With Sheet1
        
        Set Rng = Range(Cells(9, 1), Cells(LastRow, 45))
            'Debug.Print Rng
        .AutoFilterMode = False
        
        Rng.AutoFilter
        
        'Rng.AutoFilter FIELD:=1, VISIBLEDROPDOWN:=False
        
        'Rng.AutoFilter FIELD:=2, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 2) <> 0 And Sheets("Hob Cutters").Cells(4, 2) <> "" Then Rng.AutoFilter FIELD:=2, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 2)
            
        'Rng.AutoFilter FIELD:=3, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 3) > 0 And Sheets("Hob Cutters").Cells(5, 3) >= 0 Then Rng.AutoFilter FIELD:=3, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 3), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 3)
                If Sheets("Hob Cutters").Cells(3, 3) = 0 And Sheets("Hob Cutters").Cells(5, 3) > 0 Then Rng.AutoFilter FIELD:=3, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 3)
        
        'Rng.AutoFilter FIELD:=4, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 4) > 0 And Sheets("Hob Cutters").Cells(5, 4) >= 0 Then Rng.AutoFilter FIELD:=4, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 4), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 4)
                If Sheets("Hob Cutters").Cells(3, 4) = 0 And Sheets("Hob Cutters").Cells(5, 4) > 0 Then Rng.AutoFilter FIELD:=4, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 4)
    
        'Rng.AutoFilter FIELD:=5, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 5) > 0 And Sheets("Hob Cutters").Cells(5, 5) >= 0 Then Rng.AutoFilter FIELD:=5, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 5), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 5)
                If Sheets("Hob Cutters").Cells(3, 5) = 0 And Sheets("Hob Cutters").Cells(5, 5) > 0 Then Rng.AutoFilter FIELD:=5, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 5)

        'Rng.AutoFilter FIELD:=6, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 6) > 0 And Sheets("Hob Cutters").Cells(5, 6) >= 0 Then Rng.AutoFilter FIELD:=6, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 6), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 6)
                If Sheets("Hob Cutters").Cells(3, 6) = 0 And Sheets("Hob Cutters").Cells(5, 6) > 0 Then Rng.AutoFilter FIELD:=6, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 6)
            
        'Rng.AutoFilter FIELD:=7, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 7) > 0 And Sheets("Hob Cutters").Cells(5, 7) >= 0 Then Rng.AutoFilter FIELD:=7, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 7), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 7)
                If Sheets("Hob Cutters").Cells(3, 7) = 0 And Sheets("Hob Cutters").Cells(5, 7) > 0 Then Rng.AutoFilter FIELD:=7, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 7)
        
        'Rng.AutoFilter FIELD:=8, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 8) <> 0 And Sheets("Hob Cutters").Cells(4, 8) <> "" Then Rng.AutoFilter FIELD:=8, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 8)
            
        'Rng.AutoFilter FIELD:=9, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 9) <> 0 And Sheets("Hob Cutters").Cells(4, 9) <> "" Then Rng.AutoFilter FIELD:=9, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 9)

        'Rng.AutoFilter FIELD:=10, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 10) > 0 And Sheets("Hob Cutters").Cells(5, 10) >= 0 Then Rng.AutoFilter FIELD:=10, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 10), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 10)
                If Sheets("Hob Cutters").Cells(3, 10) = 0 And Sheets("Hob Cutters").Cells(5, 10) > 0 Then Rng.AutoFilter FIELD:=10, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 10)
            
        'Rng.AutoFilter FIELD:=11, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 11) > 0 And Sheets("Hob Cutters").Cells(5, 11) >= 0 Then Rng.AutoFilter FIELD:=11, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 11), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 11)
                If Sheets("Hob Cutters").Cells(3, 11) = 0 And Sheets("Hob Cutters").Cells(5, 11) > 0 Then Rng.AutoFilter FIELD:=11, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 11)
            
        'Rng.AutoFilter FIELD:=12, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 12) > 0 And Sheets("Hob Cutters").Cells(5, 12) >= 0 Then Rng.AutoFilter FIELD:=12, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 12), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 12)
                If Sheets("Hob Cutters").Cells(3, 12) = 0 And Sheets("Hob Cutters").Cells(5, 12) > 0 Then Rng.AutoFilter FIELD:=12, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 12)
            
        'Rng.AutoFilter FIELD:=13, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 13) > 0 And Sheets("Hob Cutters").Cells(5, 13) >= 0 Then Rng.AutoFilter FIELD:=13, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 13), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 13)
                If Sheets("Hob Cutters").Cells(3, 13) = 0 And Sheets("Hob Cutters").Cells(5, 13) > 0 Then Rng.AutoFilter FIELD:=13, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 13)
            
        'Rng.AutoFilter FIELD:=14, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 14) > 0 And Sheets("Hob Cutters").Cells(5, 14) >= 0 Then Rng.AutoFilter FIELD:=14, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 14), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 14)
                If Sheets("Hob Cutters").Cells(3, 14) = 0 And Sheets("Hob Cutters").Cells(5, 14) > 0 Then Rng.AutoFilter FIELD:=14, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 14)
            
        'Rng.AutoFilter FIELD:=15, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 15) > 0 And Sheets("Hob Cutters").Cells(5, 15) >= 0 Then Rng.AutoFilter FIELD:=15, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 15), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 15)
                If Sheets("Hob Cutters").Cells(3, 15) = 0 And Sheets("Hob Cutters").Cells(5, 15) > 0 Then Rng.AutoFilter FIELD:=15, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 15)
            
        'Rng.AutoFilter FIELD:=16, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 16) > 0 And Sheets("Hob Cutters").Cells(5, 16) >= 0 Then Rng.AutoFilter FIELD:=16, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 16), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 16)
                If Sheets("Hob Cutters").Cells(3, 16) = 0 And Sheets("Hob Cutters").Cells(5, 16) > 0 Then Rng.AutoFilter FIELD:=16, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 16)
            
        'Rng.AutoFilter FIELD:=17, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 17) > 0 And Sheets("Hob Cutters").Cells(5, 17) >= 0 Then Rng.AutoFilter FIELD:=17, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 17), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 17)
                If Sheets("Hob Cutters").Cells(3, 17) = 0 And Sheets("Hob Cutters").Cells(5, 17) > 0 Then Rng.AutoFilter FIELD:=17, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 17)
            
        'Rng.AutoFilter FIELD:=18, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 18) > 0 And Sheets("Hob Cutters").Cells(5, 18) >= 0 Then Rng.AutoFilter FIELD:=18, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 18), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 18)
                If Sheets("Hob Cutters").Cells(3, 18) = 0 And Sheets("Hob Cutters").Cells(5, 18) > 0 Then Rng.AutoFilter FIELD:=18, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 18)
                
        'Rng.AutoFilter FIELD:=19, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 19) > 0 And Sheets("Hob Cutters").Cells(5, 19) >= 0 Then Rng.AutoFilter FIELD:=19, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 19), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 19)
                If Sheets("Hob Cutters").Cells(3, 19) = 0 And Sheets("Hob Cutters").Cells(5, 19) > 0 Then Rng.AutoFilter FIELD:=19, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 19)
                
        'Rng.AutoFilter FIELD:=20, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 20) > 0 And Sheets("Hob Cutters").Cells(5, 20) >= 0 Then Rng.AutoFilter FIELD:=20, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 20), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 20)
                If Sheets("Hob Cutters").Cells(3, 20) = 0 And Sheets("Hob Cutters").Cells(5, 20) > 0 Then Rng.AutoFilter FIELD:=20, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 20)
            
        'Rng.AutoFilter FIELD:=21, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 21) > 0 And Sheets("Hob Cutters").Cells(5, 21) >= 0 Then Rng.AutoFilter FIELD:=21, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 21), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 21)
                If Sheets("Hob Cutters").Cells(3, 21) = 0 And Sheets("Hob Cutters").Cells(5, 21) > 0 Then Rng.AutoFilter FIELD:=21, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 21)
            
        'Rng.AutoFilter FIELD:=22, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 22) > 0 And Sheets("Hob Cutters").Cells(5, 22) >= 0 Then Rng.AutoFilter FIELD:=22, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 22), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 22)
                If Sheets("Hob Cutters").Cells(3, 22) = 0 And Sheets("Hob Cutters").Cells(5, 22) > 0 Then Rng.AutoFilter FIELD:=22, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 22)
            
        'Rng.AutoFilter FIELD:=23, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 23) > 0 And Sheets("Hob Cutters").Cells(5, 23) >= 0 Then Rng.AutoFilter FIELD:=23, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 23), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 23)
                If Sheets("Hob Cutters").Cells(3, 23) = 0 And Sheets("Hob Cutters").Cells(5, 23) > 0 Then Rng.AutoFilter FIELD:=23, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 23)
            
        'Rng.AutoFilter FIELD:=24, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 24) > 0 And Sheets("Hob Cutters").Cells(5, 24) >= 0 Then Rng.AutoFilter FIELD:=24, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 24), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 24)
                If Sheets("Hob Cutters").Cells(3, 24) = 0 And Sheets("Hob Cutters").Cells(5, 24) > 0 Then Rng.AutoFilter FIELD:=24, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 24)
            
        'Rng.AutoFilter FIELD:=25, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 25) > 0 And Sheets("Hob Cutters").Cells(5, 25) >= 0 Then Rng.AutoFilter FIELD:=25, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 25), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 25)
                If Sheets("Hob Cutters").Cells(3, 25) = 0 And Sheets("Hob Cutters").Cells(5, 25) > 0 Then Rng.AutoFilter FIELD:=25, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 25)
            
        'Rng.AutoFilter FIELD:=26, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 26) > 0 And Sheets("Hob Cutters").Cells(5, 26) >= 0 Then Rng.AutoFilter FIELD:=26, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 26), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 26)
                If Sheets("Hob Cutters").Cells(3, 26) = 0 And Sheets("Hob Cutters").Cells(5, 26) > 0 Then Rng.AutoFilter FIELD:=26, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 26)
            
        'Rng.AutoFilter FIELD:=27, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 27) > 0 And Sheets("Hob Cutters").Cells(5, 27) >= 0 Then Rng.AutoFilter FIELD:=27, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 27), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 27)
                If Sheets("Hob Cutters").Cells(3, 27) = 0 And Sheets("Hob Cutters").Cells(5, 27) > 0 Then Rng.AutoFilter FIELD:=27, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 27)
            
        'Rng.AutoFilter FIELD:=28, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 28) > 0 And Sheets("Hob Cutters").Cells(5, 28) >= 0 Then Rng.AutoFilter FIELD:=28, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 28), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 28)
                If Sheets("Hob Cutters").Cells(3, 28) = 0 And Sheets("Hob Cutters").Cells(5, 28) > 0 Then Rng.AutoFilter FIELD:=28, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 28)
            
        'Rng.AutoFilter FIELD:=29, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 29) > 0 And Sheets("Hob Cutters").Cells(5, 29) >= 0 Then Rng.AutoFilter FIELD:=29, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 29), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 29)
                If Sheets("Hob Cutters").Cells(3, 29) = 0 And Sheets("Hob Cutters").Cells(5, 29) > 0 Then Rng.AutoFilter FIELD:=29, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 29)
            
        'Rng.AutoFilter FIELD:=30, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 30) > 0 And Sheets("Hob Cutters").Cells(5, 30) >= 0 Then Rng.AutoFilter FIELD:=30, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 30), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 30)
                If Sheets("Hob Cutters").Cells(3, 30) = 0 And Sheets("Hob Cutters").Cells(5, 30) > 0 Then Rng.AutoFilter FIELD:=30, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 30)
            
        'Rng.AutoFilter FIELD:=31, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 31) > 0 And Sheets("Hob Cutters").Cells(5, 31) >= 0 Then Rng.AutoFilter FIELD:=31, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 31), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 31)
                If Sheets("Hob Cutters").Cells(3, 31) = 0 And Sheets("Hob Cutters").Cells(5, 31) > 0 Then Rng.AutoFilter FIELD:=31, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 31)
            
        'Rng.AutoFilter FIELD:=32, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 32) > 0 And Sheets("Hob Cutters").Cells(5, 32) >= 0 Then Rng.AutoFilter FIELD:=32, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 32), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 32)
                If Sheets("Hob Cutters").Cells(3, 32) = 0 And Sheets("Hob Cutters").Cells(5, 32) > 0 Then Rng.AutoFilter FIELD:=32, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 32)
            
        'Rng.AutoFilter FIELD:=33, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 33) > 0 And Sheets("Hob Cutters").Cells(5, 33) >= 0 Then Rng.AutoFilter FIELD:=33, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 33), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 33)
                If Sheets("Hob Cutters").Cells(3, 33) = 0 And Sheets("Hob Cutters").Cells(5, 33) > 0 Then Rng.AutoFilter FIELD:=33, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 33)
            
        'Rng.AutoFilter FIELD:=34, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 34) > 0 And Sheets("Hob Cutters").Cells(5, 34) >= 0 Then Rng.AutoFilter FIELD:=34, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 34), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 34)
                If Sheets("Hob Cutters").Cells(3, 34) = 0 And Sheets("Hob Cutters").Cells(5, 34) > 0 Then Rng.AutoFilter FIELD:=34, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 34)
                
        'Rng.AutoFilter FIELD:=35, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 35) > 0 And Sheets("Hob Cutters").Cells(5, 35) >= 0 Then Rng.AutoFilter FIELD:=35, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 35), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 35)
                If Sheets("Hob Cutters").Cells(3, 35) = 0 And Sheets("Hob Cutters").Cells(5, 35) > 0 Then Rng.AutoFilter FIELD:=35, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 35)
            
        'Rng.AutoFilter FIELD:=36, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 36) <> 0 And Sheets("Hob Cutters").Cells(4, 36) <> "" Then Rng.AutoFilter FIELD:=36, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 36)
            
        'Rng.AutoFilter FIELD:=37, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 37) > 0 And Sheets("Hob Cutters").Cells(5, 37) >= 0 Then Rng.AutoFilter FIELD:=37, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 37), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 37)
                If Sheets("Hob Cutters").Cells(3, 37) = 0 And Sheets("Hob Cutters").Cells(5, 37) > 0 Then Rng.AutoFilter FIELD:=37, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 37)
            
        'Rng.AutoFilter FIELD:=38, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 38) > 0 And Sheets("Hob Cutters").Cells(5, 38) >= 0 Then Rng.AutoFilter FIELD:=38, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 38), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 38)
                If Sheets("Hob Cutters").Cells(3, 38) = 0 And Sheets("Hob Cutters").Cells(5, 38) > 0 Then Rng.AutoFilter FIELD:=38, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 38)
                
        'Rng.AutoFilter FIELD:=39, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 39) > 0 And Sheets("Hob Cutters").Cells(5, 39) >= 0 Then Rng.AutoFilter FIELD:=39, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 39), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 39)
                If Sheets("Hob Cutters").Cells(3, 39) = 0 And Sheets("Hob Cutters").Cells(5, 39) > 0 Then Rng.AutoFilter FIELD:=39, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 39)
                
        'Rng.AutoFilter FIELD:=40, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 40) > 0 And Sheets("Hob Cutters").Cells(5, 40) >= 0 Then Rng.AutoFilter FIELD:=40, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 40), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 40)
                If Sheets("Hob Cutters").Cells(3, 40) = 0 And Sheets("Hob Cutters").Cells(5, 40) > 0 Then Rng.AutoFilter FIELD:=40, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 40)
                
        'Rng.AutoFilter FIELD:=41, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 41) > 0 And Sheets("Hob Cutters").Cells(5, 41) >= 0 Then Rng.AutoFilter FIELD:=41, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 41), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 41)
                If Sheets("Hob Cutters").Cells(3, 41) = 0 And Sheets("Hob Cutters").Cells(5, 41) > 0 Then Rng.AutoFilter FIELD:=41, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 41)
                    
        'Rng.AutoFilter FIELD:=42, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 42) > 0 And Sheets("Hob Cutters").Cells(5, 42) >= 0 Then Rng.AutoFilter FIELD:=42, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 42), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 42)
                If Sheets("Hob Cutters").Cells(3, 42) = 0 And Sheets("Hob Cutters").Cells(5, 42) > 0 Then Rng.AutoFilter FIELD:=42, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 42)
            
        'Rng.AutoFilter FIELD:=43, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(3, 43) > 0 And Sheets("Hob Cutters").Cells(5, 43) >= 0 Then Rng.AutoFilter FIELD:=43, Criteria1:="<=" & Sheets("Hob Cutters").Cells(3, 43), Criteria2:=">=" & Sheets("Hob Cutters").Cells(5, 43)
                If Sheets("Hob Cutters").Cells(3, 43) = 0 And Sheets("Hob Cutters").Cells(5, 43) > 0 Then Rng.AutoFilter FIELD:=43, Criteria1:=">=" & Sheets("Hob Cutters").Cells(5, 43)
        
        'Rng.AutoFilter FIELD:=44, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 44) <> 0 And Sheets("Hob Cutters").Cells(4, 44) <> "" Then Rng.AutoFilter FIELD:=44, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 44)
        
        'Rng.AutoFilter FIELD:=45, VISIBLEDROPDOWN:=False
            If Sheets("Hob Cutters").Cells(4, 45) <> 0 And Sheets("Hob Cutters").Cells(4, 45) <> "" Then Rng.AutoFilter FIELD:=45, Criteria1:="=" & Sheets("Hob Cutters").Cells(4, 45)
                
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
    
    End With
    
Application.EnableEvents = True
    Exit Sub
Terminate:
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
    End

End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Private Sub CORRECTION()

Application.EnableEvents = True

End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Private Sub TEST()
 
Debug.Print

End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
You have code that disables events and sets calculation to manual, here it is,
Code:
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
and this is the code to enable events and set calculation to automatic.
Code:
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The code is putting the correct values into the right cells on the sheet but it won't complete the calculations. Not sure the best way to do things. Currently you click command button 2 after you've entered your search criteria. You then click cmdDisplay in order to activate the calculations and update the data. Problem I'm having is that the cmdDisplay portion isn't updating the sheet/calculations.

Code:
'Function for looping through UserForm ComboBoxes
Function GetCBValue(cb As MSForms.ComboBox) As String
If cb.ListIndex <> -1 Then
GetCBValue = cb.Value
Else
GetCBValue = vbNullString
End If
End Function

'Calculate Values
Private Sub cmdDisplay_Click()
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub
'This is where the search entries are
Private Sub CommandButton2_Click()

'Stop calculations
Application.EnableEvents = False
Application.Calculation = xlCalculationManual

Dim ws As Worksheet
Set ws = Sheet1
With ws

.Range("C3").Value = GetCBValue(Me.comboPressure)
.Range("C5").Value = GetCBValue(Me.comboPressure)

.Range("D3").Value = GetCBValue(Me.comboPitch)
.Range("D5").Value = GetCBValue(Me.comboPitch)

.Range("E3").Value = GetCBValue(Me.comboModule)
.Range("E5").Value = GetCBValue(Me.comboModule)

.Range("F3").Value = GetCBValue(Me.comboSplitPitch)
.Range("F5").Value = GetCBValue(Me.comboSplitPitch)

.Range("G3").Value = GetCBValue(Me.comboSplitModule)
.Range("G5").Value = GetCBValue(Me.comboSplitModule)

.Range("H3").Value = GetCBValue(Me.comboKeyPart)
.Range("H5").Value = GetCBValue(Me.comboKeyPart)

.Range("I3").Value = GetCBValue(Me.comboType)
.Range("I5").Value = GetCBValue(Me.comboType)

.Range("J3").Value = GetCBValue(Me.comboPressure2)
.Range("J5").Value = GetCBValue(Me.comboPressure2)

.Range("K3").Value = GetCBValue(Me.comboGeneratingPitch)
.Range("K5").Value = GetCBValue(Me.comboGeneratingPitch)

.Range("L3").Value = GetCBValue(Me.comboGeneratingModule)
.Range("L5").Value = GetCBValue(Me.comboGeneratingModule)

.Range("M3").Value = GetCBValue(Me.comboRampAngle)
.Range("M5").Value = GetCBValue(Me.comboRampAngle)

.Range("N3").Value = GetCBValue(Me.comboRampLocation)
.Range("N5").Value = GetCBValue(Me.comboRampLocation)

.Range("O3").Value = GetCBValue(Me.comboRampLocation2)
.Range("O5").Value = GetCBValue(Me.comboRampLocation2)

.Range("P3").Value = GetCBValue(Me.comboToothThickness)
.Range("P5").Value = GetCBValue(Me.comboToothThickness)

.Range("Q3").Value = GetCBValue(Me.comboToothThickness2)
.Range("Q5").Value = GetCBValue(Me.comboToothThickness2)

.Range("R3").Value = GetCBValue(Me.comboAddendum)
.Range("R5").Value = GetCBValue(Me.comboAddendum)

.Range("S3").Value = GetCBValue(Me.comboAddendum2)
.Range("S5").Value = GetCBValue(Me.comboAddendum2)

.Range("T3").Value = GetCBValue(Me.comboTipRadius)
.Range("T5").Value = GetCBValue(Me.comboTipRadius)

.Range("U3").Value = GetCBValue(Me.comboTipRadius2)
.Range("U5").Value = GetCBValue(Me.comboTipRadius2)

.Range("V3").Value = GetCBValue(Me.comboFinishStock)
.Range("V5").Value = GetCBValue(Me.comboFinishStock)

.Range("W3").Value = GetCBValue(Me.comboFinishStock2)
.Range("W5").Value = GetCBValue(Me.comboFinishStock2)

.Range("X3").Value = GetCBValue(Me.comboProtuberance)
.Range("X5").Value = GetCBValue(Me.comboProtuberance)

.Range("Y3").Value = GetCBValue(Me.comboProtuberance2)
.Range("Y5").Value = GetCBValue(Me.comboProtuberance2)

.Range("Z3").Value = GetCBValue(Me.comboCDimension)
.Range("Z5").Value = GetCBValue(Me.comboCDimension)

.Range("AA3").Value = GetCBValue(Me.comboCDimension)
.Range("AA5").Value = GetCBValue(Me.comboCDimension)

.Range("AB3").Value = GetCBValue(Me.comboFlankAngle)
.Range("AB5").Value = GetCBValue(Me.comboFlankAngle)

.Range("AC3").Value = GetCBValue(Me.comboBDimension)
.Range("AC5").Value = GetCBValue(Me.comboBDimension)

.Range("AD3").Value = GetCBValue(Me.comboBDimension)
.Range("AD5").Value = GetCBValue(Me.comboBDimension)

.Range("AE3").Value = GetCBValue(Me.comboWholeDepth)
.Range("AE5").Value = GetCBValue(Me.comboWholeDepth)

.Range("AF3").Value = GetCBValue(Me.comboWholeDepth2)
.Range("AF5").Value = GetCBValue(Me.comboWholeDepth2)

.Range("AG3").Value = GetCBValue(Me.comboRootRadius)
.Range("AG5").Value = GetCBValue(Me.comboRootRadius)

.Range("AH3").Value = GetCBValue(Me.comboRootRadius2)
.Range("AH5").Value = GetCBValue(Me.comboRootRadius2)

.Range("AI3").Value = GetCBValue(Me.comboThreads)
.Range("AI5").Value = GetCBValue(Me.comboThreads)

.Range("AJ3").Value = GetCBValue(Me.comboThreadHand)
.Range("AJ5").Value = GetCBValue(Me.comboThreadHand)

.Range("AK3").Value = GetCBValue(Me.comboGashes)
.Range("AK5").Value = GetCBValue(Me.comboGashes)

.Range("AL3").Value = GetCBValue(Me.comboOutsideDiameter)
.Range("AL5").Value = GetCBValue(Me.comboOutsideDiameter)

.Range("AM3").Value = GetCBValue(Me.comboOutsideDiameter2)
.Range("AM5").Value = GetCBValue(Me.comboOutsideDiameter2)

.Range("AN3").Value = GetCBValue(Me.comboOverallLength)
.Range("AN5").Value = GetCBValue(Me.comboOverallLength)

.Range("AO3").Value = GetCBValue(Me.comboOverallLength2)
.Range("AO5").Value = GetCBValue(Me.comboOverallLength2)

.Range("AP3").Value = GetCBValue(Me.comboHole)
.Range("AP5").Value = GetCBValue(Me.comboHole)

.Range("AQ3").Value = GetCBValue(Me.comboHole2)
.Range("AQ5").Value = GetCBValue(Me.comboHole2)

End With

Me.ListBox1.RowSource = "Data"

End Sub
Private Sub UserForm_Initialize()
With Application
    Me.Top = .Top
    Me.Left = .Left
    Me.Height = .Height
    Me.Width = .Width
End With
End Sub
 
Upvote 0
Have you tried forcing calculation?

This will calculate all open workbooks.
Code:
Calculate
 
Upvote 0
I tried the force calculation in my cmdDisplay button code but yielded the same results.

Code:
'Calculate Values
Private Sub cmdDisplay_Click()
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
Calculate
Application.ScreenUpdating = True

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top