• DİKKAT

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

Soru Asgari Geçim İndirimi

sirkülasyon

Altın Üye
Katılım
10 Temmuz 2012
Mesajlar
2,543
Excel Vers. ve Dili
2021 LTSC TR
Ekli dosyamda yer alan userformda modül1 içinde bulunan KTF koduna göre userform üzerinde asgari geçim indirimini hesaplamam lazım. Yalnız asgari geçim indirimi ne olursa olsun "TextBox2" aylık gelir vergisini kesinlikle geçmemesi lazım.
Rica etsem asgari geçim indirimini hesaplanması için yardımcı olabilir misiniz?
Saygı ve hürmetlerimle
 

Ekli dosyalar

Aşağıdaki kodu dener misiniz?

PHP:
Private Sub CommandButton1_Click()
If ComboBox1 <> "" And ComboBox2 <> "" And ComboBox2 <> "" And IsNumeric(TextBox2) = True Then
    oran = 50
    If ComboBox2 = "Eşi Çalışmıyor" Then oran = oran + 10
    If ComboBox3 = "1" Then oran = oran + 7.5
    If ComboBox3 = "2" Then oran = oran + 7.5
    If ComboBox3 = "3" Then oran = oran + 10
    If ComboBox3 = "4" Then oran = oran + 5
    If ComboBox3 = "5" Then oran = oran + 5
    If ComboBox3 = "6" Then oran = oran + 5
    oran = WorksheetFunction.Min(85, oran)
    agi = Round(TextBox1 * 0.15 * oran / 100, 2)
    TextBox3 = WorksheetFunction.Min(agi, CDbl(TextBox2))
End If
End Sub
 
Bekar olandaki hatayı gidermek için aşağıdaki kodları kullanın:

PHP:
Private Sub ComboBox1_Change()
If ComboBox1 = "Bekar" Then
    ComboBox2.Enabled = False
    ComboBox2.Value = "Eşi Yok"
Else
    ComboBox2.Enabled = True
End If
End Sub

Private Sub CommandButton1_Click()
If ComboBox1 <> "" And ComboBox2 <> "" And IsNumeric(TextBox2) = True Then
    oran = 50
    If ComboBox2 = "Eşi Çalışmıyor" Then oran = oran + 10
    If ComboBox3 = "1" Then oran = oran + 7.5
    If ComboBox3 = "2" Then oran = oran + 7.5
    If ComboBox3 = "3" Then oran = oran + 10
    If ComboBox3 = "4" Then oran = oran + 5
    If ComboBox3 = "5" Then oran = oran + 5
    If ComboBox3 = "6" Then oran = oran + 5
    oran = WorksheetFunction.Min(85, oran)
    agi = Round(TextBox1 * 0.15 * oran / 100, 2)
    TextBox3 = WorksheetFunction.Min(agi, CDbl(TextBox2))
End If
End Sub

Private Sub UserForm_Initialize()
ComboBox1.List = Array("Evli", "Bekar")
ComboBox2.List = Array("Eşi Yok", "Eşi Çalışıyor", "Eşi Çalışmıyor")
ComboBox3.List = Array("0", "1", "2", "3", "4", "5")
TextBox1 = "2943,00"
End Sub

Merak ediyorum, basitçe excel sayfası üzerinden formüllerle halledilebilecek bir işlemi neden userformla yapıp karmaşıklaştırıyorsunuz?
 
Çok çok teşekkür ederim. Ellerine sağlık Yusuf Abi
 
Geri
Üst