- Katılım
- 5 Kasım 2007
- Mesajlar
- 4,727
- Excel Vers. ve Dili
- 64 Bit TR - Microsoft Office 365 - Win11 Home
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Butonsuz bilgi alışverişi için sayfa olayları kullanılabilir.
Siz hangi durumda hesaplama yapılmasını istiyorsunuz?
[FONT="Arial Narrow"]Private Sub Worksheet_Activate()
Set st = Sheets("STOK"): Set ve = Sheets("VERİLER")
Range("H2:H65536").ClearContents: Range("J2:L65536").ClearContents
For brn = 2 To [C65536].End(3).Row
If WorksheetFunction.CountIf(st.Range("B:B"), Cells(brn, "C")) > 0 Then
Cells(brn, "H") = st.Cells(WorksheetFunction.Match(Cells(brn, "C"), st.Range("B:B"), 0), "N")
End If
If WorksheetFunction.CountIf(ve.Range("B:B"), Cells(brn, "C")) > 0 Then
If Cells(brn, 4) = "Gr" Then
bölü = 1000
Else
bölü = 1
End If
Cells(brn, "J") = ve.Cells(WorksheetFunction.Match(Cells(brn, "C"), _
ve.Range("B:B"), 0), "C") * Cells(brn, "E") / bölü
Cells(brn, "K") = ve.Cells(WorksheetFunction.Match(Cells(brn, "C"), _
ve.Range("B:B"), 0), "C") * Cells(brn, "F") / bölü
Cells(brn, "L") = ve.Cells(WorksheetFunction.Match(Cells(brn, "C"), _
ve.Range("B:B"), 0), "C") * Cells(brn, "G") / bölü
End If
Next
End Sub[/FONT]