- Katılım
- 18 Ocak 2008
- Mesajlar
- 12,852
- Excel Vers. ve Dili
-
2003 excell türkçe
ve
2007 excell türkçe
Bu uygulama Nokta ve virgüllerin yer değişimi ile ilgilidir.
Bu kod seçilen bölüm ile ilgili noktaları virgül , Virgülleri nokta yapar.
kod:
Bu kod seçilen bölüm ile ilgili noktaları virgül , Virgülleri nokta yapar.
kod:
Kod:
Sub noktavirgulduzelt()
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
.EnableEvents = False
End With
Dim cell As Range
nokta = "."
virgul = ","
For Each cell In ActiveWindow.RangeSelection.Cells
deg1 = Split(cell.Value, nokta)
deg2 = Split(cell.Value, virgul)
hucre = cell.NumberFormat
cell.NumberFormat = "@"
veri = ""
k = 0
kk = 0
If IsNumeric(cell.Value) = True Then
If UBound(deg1) > 0 Then
For i = 0 To Val(UBound(deg1))
k = k + 1
If k = 1 Then
veri = deg1(i)
Else
veri = veri & virgul & deg1(i)
End If
Next
If UBound(deg1) = 1 Then
cell.Value = veri * 1
Else
cell.Value = veri
End If
ElseIf UBound(deg2) > 0 Then
For i = 0 To Val(UBound(deg2))
kk = kk + 1
If kk = 1 Then
veri = deg2(i)
Else
veri = veri & nokta & deg2(i)
End If
Next
cell.Value = veri
Else
cell.Value = veri
End If
Else
If UBound(deg1) Then
For i = 0 To Val(UBound(deg1))
k = k + 1
If k = 1 Then
veri = deg1(i)
Else
veri = veri & virgul & deg1(i)
End If
Next
cell.Value = veri
End If
If UBound(deg2) Then
For i = 0 To Val(UBound(deg2))
kk = kk + 1
If kk = 1 Then
veri = deg2(i)
Else
veri = veri & nokta & deg2(i)
End If
Next
cell.Value = veri
End If
cell.Value = cell.Value
End If
cell.NumberFormat = hucre
Next
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = CalcMode
End With
End Sub
Ekli dosyalar
-
37.5 KB Görüntüleme: 34