• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Soru değer yüzde değerden küçükse

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [F3:F65536]) Is Nothing Then Exit Sub
sat = Target.Row

If Cells(sat, "F").Value <> "" And Cells(sat, "G").Value < KÜÇÜKSE %50' DEN Then
Hesaplama kodları
Else
Cells(sat, "G") = ""
Cells(sat, "H") = ""
Cells(sat, "I") = ""
Cells(sat, "J") = ""
Cells(sat, "K") = ""
Cells(sat, "L") = ""
Cells(sat, "M") = ""
End If
End Sub

KÜÇÜKSE %50' DEN ifadesini nasıl yazabilirim?
 
Yüzde Elli, 0.5 değerine eşit olduğu için
If Cells(sat, "F").Value <> "" And Cells(sat, "G").Value < 0.5 olarak yazabilirsiniz.
 
ustam
o şekilde denedim. İlk yazdığımda siliyor. Hücreye ikinci kere girip çıkarsan tekrar hesaplıyor.
 
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [F3:F65536]) Is Nothing Then Exit Sub
sat = Target.Row

If Cells(sat, "F").Value <> "" And Cells(sat, "G").Value < 0.8 Then
Cells(sat, "G") = Round(Cells(sat, "F") / Cells(sat, "E"), 2)
Cells(sat, "H") = Cells(sat, "E") * 80 / 100
Cells(sat, "I") = Cells(sat, "H") - Cells(sat, "F")
Cells(sat, "J") = Cells(sat, "I") * 5 / 100
Cells(sat, "K") = Cells(sat, "J") * 0.00948
Cells(sat, "l") = Cells(sat, "j") * 0.00948
Cells(sat, "M") = Cells(sat, "J") - Cells(sat, "L")
Else

Cells(sat, "G") = ""
Cells(sat, "H") = ""
Cells(sat, "I") = ""
Cells(sat, "J") = ""
Cells(sat, "K") = ""
Cells(sat, "L") = ""
Cells(sat, "M") = ""
End If
End Sub
 
sizin dediğiniz gibi yaptım çözüldü hocam.
Yardımınız için teşekkür ederim.
 
Rica ederim.
 
Geri
Üst