ADD IN TERBILANG DALAM BAHASA INGGRIS – Belajar Microsoft Excel : Tips, Tricks & Tutorial

ADD IN TERBILANG DALAM BAHASA INGGRIS

menanggapi permintaan untuk membuat terbilang versi inggris …. berikut adalah kodenya :

1 Public Function terb16en(x As Double) As String
2 ANGKA = Array(“”, “one”, “two”, “three”, “four”, “five”, “six”, “seven”, “eight”, “nine”, “ten”, “eleven”, “twelve”, “threeteen”, “fourteen”, “fiveteen”, “sixteen”, “seventeen”, “eighteen”, “nineteen”)
3 LEVEL = Array(” Trillion “, ” Billion “, ” Million “, ” Thousand “, ” “)
4 puluhan = Array(“”, “”, “twenty “, “thirty “, “forty “, “fifty “, “sixty “, “seventy “, “eighty “, “ninety “)
5 For i = 0 To 4
6 TEMPRP = “”
7 If Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 1 + (3 * i), 1) > 0 Then TEMPRP = ANGKA(Mid(Right(“000000000000000″ & Abs(Round(x, 0)), 15), 1 + (3 * i), 1)) & ” hundred “
8 If Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 2 + (3 * i), 2) < 20 Then TEMPRP = TEMPRP & ANGKA(Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 2 + (3 * i), 2))
9 If Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 2 + (3 * i), 2) >= 20 Then TEMPRP = TEMPRP & puluhan(Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 2 + (3 * i), 1)) & ANGKA(Mid(Right(“000000000000000” & Abs(Round(x, 0)), 15), 3 + (3 * i), 1))
10 BERILEVEL:
11 If TEMPRP Empty Then TEMPRP = TEMPRP & LEVEL(i)
12 terb16en = Application.WorksheetFunction.Substitute(terb16en & TEMPRP, “Se “, “Satu “)
13 Next i
14 If Abs(Round(x, 0)) = 0 Then terb16en = “zero “
15 If x < 0 Then terb16en = “Minus ” & terb16en
16 End Function

function argument-nya =TERB16EN(angka)

kode sudah saya masukkan dalam file terbilangpack.xls silahkan di download

silahkan baca juga artikel2 dengan tag TERBILANG

bingung cara downloadnya ??

Baca aja halaman download dengan klik icon berikut ini

feed , email and my social media

9 Comments

Jika sOdara menemukan sesuatu yang bermanpaat di marih .... silahkan kasih komennya