Dear rekan2 Exceller


macro vba dibawah ini kenapa ya hasilnya jika 500000000 kebawah currency dalam 
bentuk angka namun jika 500000000 keatas hasilnya tidak dalam bentuk currency 
namun #value!

Public Function hutang(x As Currency)
Dim hasil As Currency
Dim hasila As Currency
Dim hasilb As Currency
Dim hasilc As Currency
Dim hasild As Currency

If x > 500000000 Then
    x = x - 500000000
   
hasila = 25000000 * 5 / 100
hasilb = 50000000 * 10 / 100
hasilc = 500000000 * 15 / 100
hasild = x * 25 / 100
hasil = hasila + hasilb + hasilc + hasild
End If
hutang = hasil
End Function

berikut format excelnya saya lampirkan.

mohon pencerahannya rekan2 Exceller...

atas bantuannya saya ucapkan terima kasih.......



Vincent 

Attachment: hitung lebih dari.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Kirim email ke