consolidator

Форк
0
/
M3_Общий.bas 
152 строки · 5.8 Кб
1
Attribute VB_Name = "M3_Îáùèé"
2
Sub Ï0140_Ðåçüáà_òèïîâàÿ()
3
    On Error Resume Next
4
    For s0 = 1 To 200
5
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Ðåçüáà" Then Exit For
6
    Next
7
    For i = 4 To 300
8
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0) 'Òèï_ðåçüáû
9
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1) 'Ðåçüáà_òèï
10
        If UCase(q0) = UCase(Òèï_ðåçüáû) Then
11
            Ðåçüáà_òèï = q1: Exit For
12
        End If
13
    Next
14
End Sub
15

16
Sub Ï0130_Ìàðêà_ñòàëè_ïî_Ãð_ñâîéñòâ() '"Ãðóïïû ìàðîê ñòàëè ïî ïîòðåáèòåëüñêèì ñâîéñòâàì"
17
    On Error Resume Next
18
    If Ìàðêà_ñòàëè = "" Or Ìàðêà_ñòàëè = "-" Then Ãð_ñâîéñòâ = "ÃÓ"
19
    If i_ñòðîê_ÍÏ = 7 Then
20
    q = q
21
    End If
22
    For s0 = 1 To 200
23
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) _
24
            = "Ãðóïïû ìàðîê ñòàëè ïî ïîòðåáèòåëüñêèì ñâîéñòâàì" Then Exit For
25
    Next
26
    For i = 4 To 300
27
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0)
28
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1)
29
        If UCase(Ìàðêà_ñòàëè) = UCase(q0) And q0 <> "" Then Ãð_ñâîéñòâ = q1
30
    Next
31
    If Ïðîäóêò = "ÒÐÓÁÀ Ä" And Ãð_ñâîéñòâ = "ÃÞ" Then Ãð_ñâîéñòâ = "ÃÓ"
32
    
33
End Sub
34

35
Sub Ï0120_Ìàïïèíã_Êë_ïðî÷íîñòè() '"Ìàïïèíã êëàññà ïðî÷íîñòè"
36
    On Error Resume Next
37
    For s0 = 1 To 200
38
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) _
39
            = "Ìàïïèíã êëàññà ïðî÷íîñòè" Then Exit For
40
    Next
41
    For i = 4 To 300
42
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0)
43
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1)
44
        If InStr(1, UCase(Ìàðêà_ñòàëè), UCase(q0)) > 0 And q0 <> "" Then Ìàðêà_ñòàëè = q1
45
        If InStr(1, UCase(Êë_ïðî÷íîñòè), UCase(q0)) > 0 And q0 <> "" Then Êë_ïðî÷íîñòè = q1
46
    Next
47
End Sub
48

49
Sub Ï0121_Ïðèâåäåíèå_Êë_ïðî÷íîñòè()
50
    On Error Resume Next
51
    If i_ñòðîê_ÍÏ = 176 Then
52
    q = q
53
    End If
54
    q = 0
55
    If Êë_ïðî÷íîñòè <> 0 And Len(Êë_ïðî÷íîñòè) = 3 Then
56
        If IsNumeric(CSng(Mid(Êë_ïðî÷íîñòè, 2, 2))) = True Then
57
            If CSng(Mid(Êë_ïðî÷íîñòè, 2, 2)) < 100 Then q = 65
58
            If CSng(Mid(Êë_ïðî÷íîñòè, 2, 2)) < 65 Then q = 60
59
            If CSng(Mid(Êë_ïðî÷íîñòè, 2, 2)) < 60 Then q = 55
60
            If CSng(Mid(Êë_ïðî÷íîñòè, 2, 2)) < 55 Then q = 52
61
            Êë_ïðî÷íîñòè_ïðèâ = "Ê" & q
62
        End If
63
    End If
64
End Sub
65
Sub Ï0112_Ãðóïïà_ïî_êëàññó_ïðî÷íîñòè_äëÿ_ìóôò() '"Êëàññ ïðî÷íîñòè ïî ìàðêå ñòàëè"
66
    On Error Resume Next
67
    For s0 = 1 To 200
68
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Ãðóïïà ïî êëàññó ïðî÷íîñòè äëÿ ìóôò" Then Exit For
69
    Next
70
    Ãð_ïðî÷í = "ÏD"
71
    For i = 4 To 300
72
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0)
73
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1)
74
        If UCase(Êë_ïðî÷íîñòè) = UCase(q0) Then Ãð_ïðî÷í = q1
75
        
76
    Next
77
End Sub
78

79

80
Sub Ï0111_Ãðóïïà_ïî_êëàññó_ïðî÷íîñòè_äëÿ_òðóá() '"Êëàññ ïðî÷íîñòè ïî ìàðêå ñòàëè"
81
    On Error Resume Next
82
    For s0 = 1 To 200
83
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Ãðóïïà ïî êëàññó ïðî÷íîñòè äëÿ òðóá" Then Exit For
84
    Next
85
    Ãð_ïðî÷í = "ÏD"
86
    For i = 4 To 300
87
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0)
88
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1)
89
        If UCase(Êë_ïðî÷íîñòè) = UCase(q0) Then Ãð_ïðî÷í = q1
90
        If UCase(Ìàðêà_ñòàëè) = UCase(q0) Then Ãð_ïðî÷í = q1
91
    Next
92
End Sub
93

94
Sub Ï0110_Êë_ïðî÷íîñòè_ïî_ìàðêå_ñòàëè() '"Êëàññ ïðî÷íîñòè ïî ìàðêå ñòàëè"
95
    On Error Resume Next
96
    For s0 = 1 To 200
97
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Êëàññ ïðî÷íîñòè ïî ìàðêå ñòàëè" Then Exit For
98
    Next
99
    If i_ñòðîê_ÍÏ = 34 Then
100
    q = q
101
    End If
102
    For i = 4 To 300
103
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0)
104
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1)
105
        If UCase(Ìàðêà_ñòàëè) = UCase(q0) Then Êë_ïðî÷íîñòè = q1
106
    Next
107
End Sub
108

109
Sub Ï0101_Îïðåäåëåíèå_Ïðèçíàêà_ïðîêàò()
110
    On Error Resume Next
111
    For s0 = 1 To 200
112
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Ïðîäóêò ïî ÍÒÄ" Then Exit For
113
    Next
114
    For i = 4 To 500
115
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0) 'Ïðîèçâîäñòâî
116
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1) 'ÍÒÄ
117
        q2 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 2) 'Ïðîäóêò
118
        q3 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 3) 'Äîï ïðèçíàê
119
        
120
        If UCase(ÍÒÄ_êà÷_ïðîêàò) = UCase(q1) Then
121
            Ïðèçíàê = q3
122
            Exit For
123
        End If
124
    Next
125
End Sub
126

127
Sub Ï0100_Ïðîäóêò()
128
    On Error Resume Next
129
    q0 = "ïðîêàò ðóëîííûé î" ' ðóñê
130
    q1 = "ïðîêàò ðóëîííûé o" ' eng
131
    If InStr(1, LCase(Ïîëíîå_íèìåíîâàíèå), q0) > 0 Or InStr(1, LCase(Ïîëíîå_íèìåíîâàíèå), q1) > 0 Then
132
        Ïðîäóêò = "ÏÎËÎÑÀ"
133
        Exit Sub
134
    ElseIf InStr(1, LCase(Ïîëíîå_íèìåíîâàíèå), "ïðîêàò ðóëîííûé") > 0 Then
135
        Ïðîäóêò = "ÐÓËÎÍ"
136
        Exit Sub
137
    End If
138
    For s0 = 1 To 200
139
        If Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(1, s0) = "Ïðîäóêò ïî ÍÒÄ" Then Exit For
140
    Next
141
    For i = 4 To 500
142
        q0 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0) 'Ïðîèçâîäñòâî
143
        q1 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 1) 'ÍÒÄ
144
        q2 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 2) 'Ïðîäóêò
145
        q3 = Workbooks(ÈìÿÔàéëà_Ðàá).Sheets("Ñïðàâî÷íèê").Cells(i, s0 + 3) 'Äîï ïðèçíàê
146
        If UCase(Ïðîèçâîäñòâî) = UCase(q0) _
147
        And UCase(ÍÒÄ_êà÷_ïðîêàò) = UCase(q1) Or UCase(ÍÒÄ_êà÷_òðóá) = UCase(q1) Then
148
            Ïðîäóêò = q2
149
            Exit For
150
        End If
151
    Next
152
End Sub
153

154

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.