- Katılım
- 21 Kasım 2012
- Mesajlar
- 46
- Excel Vers. ve Dili
-
Excel 2013
İngilizce Dil
Merhaba Arkadaşlar,
Ekteki kodlara Progreesbar eklemeye bilirmiyiz,
Teşekkürler.
Private Sub CommandButton1_Click()
Onay = MsgBox(" Önce R214 Raporunu güncellemeniz gerek ! Güncellediniz mi ? ", vbYesNo + vbQuestion, " DİKKAT!..")
If Onay = vbNo Then
Sheets("STOCK").Select
Exit Sub
End If
Application.Calculation = xlCalculationManual
'Steel Need
With Range("R3:R" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=IF(($R$1=$AI$1),(ABS(AI3)*CT3),IF(($R$1=$AJ$1)," & _
"(ABS(AJ3)*CT3),IF(($R$1=$AK$1),(ABS(AK3)*CT3),IF(($R$1=$AL$1)," & _
"(ABS(AL3)*CT3),IF(($R$1=$AM$1),(ABS(AM3)*CT3))))))"
.Value = .Value
End With
'Steel stock EXWH
With Range("T3:T" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=EXWH "")"
.Value = .Value
End With
'Steel stock TPC
With Range("S3:S" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=RC "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=QI "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP01 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP02 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP03 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP04 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP05 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP06 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP07 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP08 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP09 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP10 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP11 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP12 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=HK01 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=HK02 "")"
.Value = .Value
End With
'Quality Stock
With Range("U3:U" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIF('Stock Report'!AD:AD,P3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,N3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,M3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,L3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,J3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,H3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,F3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,O3,'Stock Report'!AG:AG)"
.Value = .Value
End With
'Op.1 Stamping Stock
With Range("V3:V" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,P3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,J3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,K3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,P3,'Stock Report'!AE:AE,""=SM2"")"
.Value = .Value
End With
' Op.2 Bending Stock
With Range("W3:W" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=IF(A3=""KESIM""" & _
",SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,N3,'Stock Report'!AE:AE,""SM1"")" & _
",SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,O3,'Stock Report'!AE:AE,""=SM1""))"
.Value = .Value
End With
Application.Calculation = xlCalculationAutomatic
MsgBox "Güncelleme tamamlandı!"
End Sub
Ekteki kodlara Progreesbar eklemeye bilirmiyiz,
Teşekkürler.
Private Sub CommandButton1_Click()
Onay = MsgBox(" Önce R214 Raporunu güncellemeniz gerek ! Güncellediniz mi ? ", vbYesNo + vbQuestion, " DİKKAT!..")
If Onay = vbNo Then
Sheets("STOCK").Select
Exit Sub
End If
Application.Calculation = xlCalculationManual
'Steel Need
With Range("R3:R" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=IF(($R$1=$AI$1),(ABS(AI3)*CT3),IF(($R$1=$AJ$1)," & _
"(ABS(AJ3)*CT3),IF(($R$1=$AK$1),(ABS(AK3)*CT3),IF(($R$1=$AL$1)," & _
"(ABS(AL3)*CT3),IF(($R$1=$AM$1),(ABS(AM3)*CT3))))))"
.Value = .Value
End With
'Steel stock EXWH
With Range("T3:T" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=EXWH "")"
.Value = .Value
End With
'Steel stock TPC
With Range("S3:S" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=RC "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=QI "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP01 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP02 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP03 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP04 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP05 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP06 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP07 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP08 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP09 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP10 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP11 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=KP12 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=HK01 "")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,Q3,'Stock Report'!C:C,""=HK02 "")"
.Value = .Value
End With
'Quality Stock
With Range("U3:U" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIF('Stock Report'!AD:AD,P3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,N3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,M3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,L3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,J3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,H3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,F3,'Stock Report'!AG:AG)" & _
"+SUMIF('Stock Report'!AD:AD,O3,'Stock Report'!AG:AG)"
.Value = .Value
End With
'Op.1 Stamping Stock
With Range("V3:V" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,P3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,J3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,K3,'Stock Report'!AE:AE,""=SM1"")" & _
"+SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,P3,'Stock Report'!AE:AE,""=SM2"")"
.Value = .Value
End With
' Op.2 Bending Stock
With Range("W3:W" & Cells(Rows.Count, 1).End(3).Row)
.Formula = "=IF(A3=""KESIM""" & _
",SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,N3,'Stock Report'!AE:AE,""SM1"")" & _
",SUMIFS('Stock Report'!G:G,'Stock Report'!AD:AD,O3,'Stock Report'!AE:AE,""=SM1""))"
.Value = .Value
End With
Application.Calculation = xlCalculationAutomatic
MsgBox "Güncelleme tamamlandı!"
End Sub