Tecnologia, programação e muito Visual FoxPro.

segunda-feira, 21 de outubro de 2013

]] XL-mania [[ RE: Rumus If x > ...(currency) = #value!

 

mungkin disebabkan overflow, coba diubah formulanya:


hasila = 25000000 / 100 * 5
hasilb = 50000000 / 100 * 10
hasilc = 500000000 / 100 * 15
hasild = x / 100 * 25


semoga membantu



---In XL-mania@yahoogroups.com, <xl-mania@yahoogroups.com> wrote:

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

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| Maaf moderasi terlambat karena yahoogroups sering error           |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di :                                            |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
.

__,_._,___

Nenhum comentário:

Arquivo do blog