DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Sub ONDALIK_ARTTIR()
Dim HÜCRE As Range, AYIR() As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
If Len(AYIR(1)) < 30 Then
HÜCRE.NumberFormat = AYIR(0) & "." & AYIR(1) & 0
End If
Else
HÜCRE.NumberFormat = "0.0"
End If
Next
End Sub
Sub ONDALIK_AZALT()
Dim HÜCRE As Range, AYIR() As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
HÜCRE.NumberFormat = AYIR(0) & "." & Left(AYIR(1), Len(AYIR(1)) - 1)
If HÜCRE.NumberFormat = "0." Then HÜCRE.NumberFormat = "General"
Else
HÜCRE.NumberFormat = "General"
End If
Next
End Sub
Sub auto_open()
Application.OnKey "{F1}", "TL"
Application.OnKey "{F2}", "DOLAR"
Application.OnKey "{F3}", "EURO"
End Sub
Sub TL()
Selection.NumberFormat = "#,##0.00 [$TL]"
End Sub
Sub DOLAR()
Selection.NumberFormat = "#,##0.00 [$$]"
End Sub
Sub EURO()
Selection.NumberFormat = "#,##0.00 [$]"
End Sub
Sub auto_close()
'On Error Resume Next
Application.OnKey "{F1}"
Application.OnKey "{F2}"
Application.OnKey "{F3}"
End Sub
Option Explicit
Sub auto_open()
Application.OnKey "{F1}", "TL"
Application.OnKey "{F2}", "DOLAR"
Application.OnKey "{F3}", "EURO"
Application.OnKey "{F4}", "ONDALIK_ARTTIR"
Application.OnKey "{F5}", "ONDALIK_AZALT"
End Sub
Sub TL()
Selection.NumberFormat = "#,##0.00 [$TL]"
End Sub
Sub DOLAR()
Selection.NumberFormat = "#,##0.00 [$$]"
End Sub
Sub EURO()
Selection.NumberFormat = "#,##0.00 [$]"
End Sub
Sub ONDALIK_ARTTIR()
Dim HÜCRE As Range, AYIR() As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
If Len(AYIR(1)) < 30 Then
HÜCRE.NumberFormat = AYIR(0) & "." & AYIR(1) & 0
End If
Else
HÜCRE.NumberFormat = "0.0"
End If
Next
End Sub
Sub ONDALIK_AZALT()
Dim HÜCRE As Range, AYIR() As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
HÜCRE.NumberFormat = AYIR(0) & "." & Left(AYIR(1), Len(AYIR(1)) - 1)
If HÜCRE.NumberFormat = "0." Then HÜCRE.NumberFormat = "General"
Else
HÜCRE.NumberFormat = "General"
End If
Next
End Sub
Sub auto_close()
'On Error Resume Next
Application.OnKey "{F1}"
Application.OnKey "{F2}"
Application.OnKey "{F3}"
Application.OnKey "{F4}"
Application.OnKey "{F5}"
End Sub
Option Explicit
Sub AUTO_OPEN()
Application.OnKey "{F1}", "TL"
Application.OnKey "{F2}", "DOLAR"
Application.OnKey "{F3}", "EURO"
Application.OnKey "{F4}", "KG"
Application.OnKey "{F5}", "ONDALIK_ARTTIR"
Application.OnKey "{F6}", "ONDALIK_AZALT"
End Sub
Sub TL()
Selection.NumberFormat = "#,##0.00 [$TL]"
End Sub
Sub DOLAR()
Selection.NumberFormat = "#,##0.00 [$$]"
End Sub
Sub EURO()
Selection.NumberFormat = "#,##0.00 [$€]"
End Sub
Sub KG()
Dim HÜCRE As Range
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, "Kg") = 0 Then
HÜCRE.NumberFormat = HÜCRE.NumberFormat & """ / Kg"""
End If
Next
End Sub
Sub ONDALIK_ARTTIR()
Dim HÜCRE As Range, AYIR() As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
If Len(AYIR(1)) < 30 Then
HÜCRE.NumberFormat = AYIR(0) & "." & "0" & AYIR(1)
End If
Else
AYIR = Split(HÜCRE.NumberFormat, " ")
If Len(HÜCRE.NumberFormat) - Len(Replace(HÜCRE.NumberFormat, " ", "")) > 1 Then
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1) & " " & AYIR(2) & " " & AYIR(3)
Else
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1)
End If
End If
Next
End Sub
Sub ONDALIK_AZALT()
Dim HÜCRE As Range, AYIR() As String, PARA_BİRİMİ As String
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
PARA_BİRİMİ = Replace(AYIR(1), 0, "")
HÜCRE.NumberFormat = AYIR(0) & "." & Right(AYIR(1), Len(AYIR(1)) - 1)
If InStr(1, HÜCRE.NumberFormat, ". ") > 0 Then HÜCRE.NumberFormat = "#,##0" & PARA_BİRİMİ
End If
Next
End Sub
Sub AUTO_CLOSE()
Application.OnKey "{F1}", ""
Application.OnKey "{F2}", ""
Application.OnKey "{F3}", ""
Application.OnKey "{F4}", ""
Application.OnKey "{F5}", ""
Application.OnKey "{F6}", ""
End Sub
Selamlar,
Ekteki örnek dosyayı incelermisiniz.
Kullanılan kod;
Kod:Option Explicit Sub AUTO_OPEN() Application.OnKey "{F1}", "TL" Application.OnKey "{F2}", "DOLAR" Application.OnKey "{F3}", "EURO" Application.OnKey "{F4}", "ONDALIK_ARTTIR" Application.OnKey "{F5}", "ONDALIK_AZALT" Application.OnKey "{F6}", "Ekle_Kg" End Sub Sub TL() Selection.NumberFormat = "#,##0.00 [$TL]" End Sub Sub DOLAR() Selection.NumberFormat = "#,##0.00 [$$]" End Sub Sub EURO() Selection.NumberFormat = "#,##0.00 [$]" End Sub Sub Ekle_Kg() Selection.NumberFormat = " " & Selection.NumberFormat & " ""/ Kg""" End Sub Sub ONDALIK_ARTTIR() Dim HÜCRE As Range, AYIR() As String For Each HÜCRE In Selection If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then AYIR = Split(HÜCRE.NumberFormat, ".") If Len(AYIR(1)) < 30 Then HÜCRE.NumberFormat = AYIR(0) & "." & "0" & AYIR(1) End If Else AYIR = Split(HÜCRE.NumberFormat, " ") HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1) End If Next End Sub Sub ONDALIK_AZALT() Dim HÜCRE As Range, AYIR() As String, PARA_BİRİMİ As String For Each HÜCRE In Selection If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then AYIR = Split(HÜCRE.NumberFormat, ".") PARA_BİRİMİ = Replace(AYIR(1), 0, "") HÜCRE.NumberFormat = AYIR(0) & "." & Right(AYIR(1), Len(AYIR(1)) - 1) If InStr(1, HÜCRE.NumberFormat, ". ") > 0 Then HÜCRE.NumberFormat = "#,##0" & PARA_BİRİMİ End If Next End Sub Sub AUTO_CLOSE() Application.OnKey "{F1}", "" Application.OnKey "{F2}", "" Application.OnKey "{F3}", "" Application.OnKey "{F4}", "" Application.OnKey "{F5}", "" Application.OnKey "{F6}", "" End Sub
If Len(HÜCRE.NumberFormat) - Len(Replace(HÜCRE.NumberFormat, " ", "")) > 1 Then
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1) & " " & AYIR(2) & " " & AYIR(3)
Else
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1)
End If
Sub ONDALIK_ARTTIR()
Dim HÜCRE As Range, AYIR() As String
On Error Resume Next
'
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".") 'Noktadan AYIR
PARA_BİRİMİ = Replace(AYIR(1), 0, "")
If Len(AYIR(1)) < 30 Then
HÜCRE.NumberFormat = AYIR(0) & "." & "0" & AYIR(1)
End If
Else
AYIR = Split(HÜCRE.NumberFormat, " ") 'Her boşlukta AYIR
PARA_BİRİMİ = Replace(AYIR(1), 0, "")
If Len(HÜCRE.NumberFormat) - Len(Replace(HÜCRE.NumberFormat, " ", "")) > 1 Then
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & AYIR(1) & " " & AYIR(2) & " " & AYIR(3)
Else 'Sadece Para Formatı Ondalık Yok İse, İlk Ondalık İçin
If HÜCRE.NumberFormat = "General" And ActiveCell > 0 Then HÜCRE.NumberFormat = "0.0"
If HÜCRE.NumberFormat = "0" And ActiveCell > 0 Then HÜCRE.NumberFormat = AYIR(0) & "." & "0": Exit Sub
HÜCRE.NumberFormat = AYIR(0) & "." & "0 " & PARA_BİRİMİ
End If
End If
Next
End Sub
Sub ONDALIK_AZALT()
Dim HÜCRE As Range, AYIR() As String, PARA_BİRİMİ As String
On Error Resume Next
'
For Each HÜCRE In Selection
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then
AYIR = Split(HÜCRE.NumberFormat, ".")
PARA_BİRİMİ = Replace(AYIR(1), 0, "")
HÜCRE.NumberFormat = AYIR(0) & "." & Right(AYIR(1), Len(AYIR(1)) - 1)
If HÜCRE.NumberFormat = "0." & PARA_BİRİMİ And ActiveCell > 0 Then _
HÜCRE.NumberFormat = AYIR(0) & PARA_BİRİMİ: Exit Sub
If InStr(1, HÜCRE.NumberFormat, ". ") > 0 Then HÜCRE.NumberFormat = "#,##0" & PARA_BİRİMİ
Else
If InStr(1, HÜCRE.NumberFormat, ".") > 0 Then HÜCRE.NumberFormat = AYIR(0) ' & AYIR(1)
End If
Next
End Sub