• DİKKAT

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

çıkarma işleminde kuruşlar gelmiyor

catalinastrap

Özgür
Destek Ekibi
Katılım
19 Ağustos 2006
Mesajlar
644
Excel Vers. ve Dili
Microsoft® Excel® Microsoft 365 için MSO /64 bit /Türkçe
Merhaba Arkadaşlar,
çıkarma işlemi yaparken kuruşlar gelmiyor
mesela 100,5-10= 90,5 gelmesi gerekirken 90 tl geliyor
kodda bir hata yapıyorum sanırım bakabilirmisiniz

If TextBox1 <> 1 Then TextBox2.Value = Val(TextBox1) - Val(st_toplam)
If TextBox1 = "" Then TextBox2 = ""
If TextBox1 <> TexBox2 Then TextBox1 = Format(TextBox1, "#,##0.00" & " TL")
If TextBox1 <> TextBox2 Then TextBox2 = Format(TextBox2, "#,##0.00" & " TL")
 
arkadaşlar bir yardım lütfen!
 
mismach hatası verdi
 
If TextBox1 <> 1 Then TextBox2.Value = CDbl(TextBox1) - CDbl(st_toplam)
If TextBox1 = "" Then TextBox2 = ""
If TextBox1 <> TexBox2 Then TextBox1 = Format(TextBox1, "#,##0.00" & " TL")
If TextBox1 <> TextBox2 Then TextBox2 = Format(TextBox2, "#,##0.00" & " TL")


mismach hatası verdi
 
If TextBox1 <> 1 Then TextBox2.Value = CDbl(TextBox1) - CDbl(st_toplam)
If TextBox1 = "" Then TextBox2 = ""
If TextBox1 <> TexBox2 Then TextBox1 = Format(TextBox1, "#,##0.00" & " TL")
If TextBox1 <> TextBox2 Then TextBox2 = Format(TextBox2, "#,##0.00" & " TL")


mismach hatası verdi
 
Merhaba,
Val yazan kod satırını aşağıdaki şekilde deneyin.
Kod:
If TextBox1 <> 1 Then TextBox2.Value = Format(TextBox1 - st_toplam, "#,##0.00")
 
Alternatif olarak aşağıdaki kodu denermisiniz.

Kod:
If TextBox1 <> 1 Then TextBox2.Value = Round(TextBox1, 2) - Round(st_toplam, 2)
 
çok teşekkür ederim
 
Geri
Üst