sayısal değeri metne çevirme hk

Erdinç_Ylmz

Altın Üye
Katılım
13 Mayıs 2020
Mesajlar
44
Excel Vers. ve Dili
TÜRKÇE
Altın Üyelik Bitiş Tarihi
13-05-2025
Merhaba
satırlarımda sayısal değerler yazmakta bunları otomatik olarak metne çevirmek istiyorum.
örnek olarak; a2:16.000 b2 de : on altı bin /// an altı bin türk lirası vb

bu konuyla ilgili varsa mümkünatı destek rica ederim.

saygılar.
 

muhsar

Altın Üye
Katılım
16 Mart 2019
Mesajlar
262
Excel Vers. ve Dili
2010 tütkçe
Altın Üyelik Bitiş Tarihi
21-03-2029
Merhaba
satırlarımda sayısal değerler yazmakta bunları otomatik olarak metne çevirmek istiyorum.
örnek olarak; a2:16.000 b2 de : on altı bin /// an altı bin türk lirası vb

bu konuyla ilgili varsa mümkünatı destek rica ederim.

saygılar.
 

Ekli dosyalar

Katılım
25 Ekim 2006
Mesajlar
349
Excel Vers. ve Dili
MS Office Standart 2016 Türkçe
Altın Üyelik Bitiş Tarihi
19-03-2024
'Yunus Açıkgöz

Option Explicit

'****************
' Main Function *
'****************
Function YAZIYAÇEVİRTL(ByVal MyNumber)

Dim Dollars, Cents, Temp
Dim DecimalPlace, Count

ReDim Place(9) As String
Place(2) = " Bin "
Place(3) = " Milyon "
Place(4) = " Milyar "
Place(5) = " Trilyon "

' String representation of amount
' Miktarın dize temsili
MyNumber = Trim(Str(MyNumber))

' Position of decimal place 0 if none
' Ondalık basamak konumu 0
DecimalPlace = InStr(MyNumber, ".")
'Convert cents and set MyNumber to dollar amount
'Kurları dönüştürün ve Numaramı doları miktarına ayarlayın
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If

Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then
If Count = 2 And Temp = "Bir" Then
Dollars = "Bin " & Dollars
Else
Dollars = Temp & Place(Count) & Dollars
End If

End If

If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop

Select Case Dollars
Case ""
Dollars = "Sıfır TL"
Case "One"
Dollars = "Bir TL"
Case Else
Dollars = Dollars & " TL"
End Select

Select Case Cents
Case ""
Cents = " "
Case "One"
Cents = " Bir Krş"
Case Else
Cents = " " & Cents & " Krş"
End Select

YAZIYAÇEVİRTL = Dollars & Cents
End Function

'*******************************************
' Converts a number from 100-999 into text*
' 100-999 arası bir sayı metne dönüştürür *
'*******************************************
Private Function GetHundreds(ByVal MyNumber)
Dim Result As String

If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)

'Convert the hundreds place
'Yüzlerce yeri dönüştürme
If Mid(MyNumber, 1, 1) <> "0" Then
If Mid(MyNumber, 1, 1) = "1" Then
Result = " Yüz "
Else
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Yüz "
End If
End If

'Convert the tens and ones place
'Onlar ve onlar yerleştirin
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If

GetHundreds = Result
End Function

'***********************************************
' Converts a number from 10 to 99 into text. *
' 10 ile 99 arasında bir sayı metne dönüştürür.*
'***********************************************
Private Function GetTens(TensText)
Dim Result As String

Result = "" 'null out the temporary function value = geçici işlev değerini sıfırla
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19 = 10-19 arası bir değer
Select Case Val(TensText)
Case 10: Result = "On"
Case 11: Result = "Onbir"
Case 12: Result = "Oniki"
Case 13: Result = "Onüç"
Case 14: Result = "Ondört"
Case 15: Result = "Onbeş"
Case 16: Result = "Onaltı"
Case 17: Result = "Onyedi"
Case 18: Result = "Onsekiz"
Case 19: Result = "OndYAZIYAÇEVİRTLz"
Case Else
End Select
Else ' If value between 20-99 = 20-99 arası değer
Select Case Val(Left(TensText, 1))
Case 2: Result = "Yirmi "
Case 3: Result = "Otuz "
Case 4: Result = "Kırk "
Case 5: Result = "Elli "
Case 6: Result = "Altmış "
Case 7: Result = "Yetmiş "
Case 8: Result = "Seksen "
Case 9: Result = "Doksan "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) 'Retrieve ones place = Birilerini al
End If
GetTens = Result
End Function

'*************************************************
' Converts a number from 1 to 9 into text. *
' 1 ile 9 arasındaki bir sayıyı metne dönüştürür.*
'*************************************************
Private Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "Bir"
Case 2: GetDigit = "İki"
Case 3: GetDigit = "Üç"
Case 4: GetDigit = "Dört"
Case 5: GetDigit = "Beş"
Case 6: GetDigit = "Altı"
Case 7: GetDigit = "Yedi"
Case 8: GetDigit = "Sekiz"
Case 9: GetDigit = "DYAZIYAÇEVİRTLz"
Case Else: GetDigit = ""
End Select
End Function

'*********************
 

Erdinç_Ylmz

Altın Üye
Katılım
13 Mayıs 2020
Mesajlar
44
Excel Vers. ve Dili
TÜRKÇE
Altın Üyelik Bitiş Tarihi
13-05-2025
DESTEKLER İÇİN SAĞ OLUN.
 
Üst