Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Target.Address(0, 0) <> "B2" And Target.Address(0, 0) <> "B3" Then
If Target.Address(0, 0) <> "C2" And Target.Address(0, 0) <> "C3" Then
If Target.Address(0, 0) <> "D2" And Target.Address(0, 0) <> "D3" Then
For X = 5 To 35
For y = 1 To 1
For Z = 2 To 16
If CDate(Cells(X, y)) <= Date Then
If Mid(Cells(X, Z).Comment.Text, 1) = "ASİT" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "BAZ" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMANYAK" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SÜLFİRİK ASİT" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "FLORİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMONYUMBİSÜLFAT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "MALEİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SODYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "POTASYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMONYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SİLİSYUMDİOKSİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SODYUM" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "POTASYUM" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "DEMİR3KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "FOSFORİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
.
.
.
.
.
.
.
' diye gidiyor(yani liste uzun)
End If
Next
Next
Next
'genel
[b2] = DEGER1 + DEGER3
[b3] = DEGER2 + DEGER4
'banka
[c2] = DEGER1
[c3] = DEGER2 + DEGER5
'cep
[d2] = DEGER3 + DEGER5
[d3] = DEGER4
End If
End If
End If
End Sub
Aradaşlar mümkünse bu formülleri daha kısa yazabilirmiyim.
Sevgi ve Saygıyla
On Error Resume Next
If Target.Address(0, 0) <> "B2" And Target.Address(0, 0) <> "B3" Then
If Target.Address(0, 0) <> "C2" And Target.Address(0, 0) <> "C3" Then
If Target.Address(0, 0) <> "D2" And Target.Address(0, 0) <> "D3" Then
For X = 5 To 35
For y = 1 To 1
For Z = 2 To 16
If CDate(Cells(X, y)) <= Date Then
If Mid(Cells(X, Z).Comment.Text, 1) = "ASİT" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "BAZ" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMANYAK" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SÜLFİRİK ASİT" Then DEGER1 = DEGER1 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "FLORİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMONYUMBİSÜLFAT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "MALEİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SODYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "POTASYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "AMONYUM KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SİLİSYUMDİOKSİT" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "SODYUM" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "POTASYUM" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "DEMİR3KLORÜR" Then DEGER2 = DEGER2 + Cells(X, Z)
If Mid(Cells(X, Z).Comment.Text, 1) = "FOSFORİK ASİT" Then DEGER2 = DEGER2 + Cells(X, Z)
.
.
.
.
.
.
.
' diye gidiyor(yani liste uzun)
End If
Next
Next
Next
'genel
[b2] = DEGER1 + DEGER3
[b3] = DEGER2 + DEGER4
'banka
[c2] = DEGER1
[c3] = DEGER2 + DEGER5
'cep
[d2] = DEGER3 + DEGER5
[d3] = DEGER4
End If
End If
End If
End Sub
Aradaşlar mümkünse bu formülleri daha kısa yazabilirmiyim.
Sevgi ve Saygıyla