1903emre34@gmail.com
Altın Üye
- Katılım
- 29 Mayıs 2016
- Mesajlar
- 945
- Excel Vers. ve Dili
- Microsoft Excel 2013 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Buyurun.Merhaba,
A sütündaki tutarları sırasıyla "B" ve "C"' e aktarmak istiyorum, kodu çalıştırdığım zaman belli sıraya kadar yanlara aktarıyor, nasıl değişiklik yapabiliriz. istenen sayfa2'de yapılmıştır.
Sub aktar59()
Dim a, i As Long, sonsat As Long
Range("B:C").ClearContents
sonsat = Cells(Rows.Count, "A").End(xlUp).Row
For i = 3 To sonsat
a = Split(Cells(i, "A").Value)
Cells(i, "C").Value = a(UBound(a) - 1)
Cells(i, "B").Value = a(UBound(a) - 2)
Next
End Sub
=EĞERHATA(İNDİS(--KIRP(PARÇAAL(YERİNEKOY(KIRP($A3);" ";YİNELE(" ";255));SATIR($1:$99)*255;255));3+SÜTUN(A1)-1);"")
Sub ayır()
a = Range("A4:A" & Cells(Rows.Count, 1).End(3).Row).Value
ReDim b(1 To UBound(a), 1 To 2)
For i = 1 To UBound(a)
say = say + 1
If a(i, 1) <> "" Then
deg = Split(a(i, 1), " ")
If IsNumeric(deg(UBound(deg) - 2)) Then b(say, 1) = CDbl(deg(UBound(deg) - 2))
If IsNumeric(deg(UBound(deg) - 1)) Then b(say, 2) = CDbl(deg(UBound(deg) - 1))
End If
Next i
Range("B4:C" & Rows.Count).ClearContents
If say > 0 Then [B4].Resize(say, 2) = b
MsgBox "İşlem tamam...", vbInformation
End Sub
Sub ayir_1()
a = Range("A4:B" & Cells(Rows.Count, 1).End(3).Row).Value
ReDim b(1 To UBound(a), 1 To 3)
On Error Resume Next
For i = 1 To UBound(a)
say = say + 1
If a(i, 1) <> "" Then
deg = Split(a(i, 1), " ")
If IsNumeric(deg(UBound(deg) - 2)) Then b(say, 2) = Format(deg(UBound(deg) - 2), "#,##0.00")
If IsNumeric(deg(UBound(deg) - 1)) Then b(say, 3) = Format(deg(UBound(deg) - 1), "#,##0.00")
sayac = InStrRev(Trim(a(i, 1)), b(say, 2))
b(say, 1) = Left(a(i, 1), sayac - 1)
End If
Next i
Range("B4:C" & Rows.Count).ClearContents
If say > 0 Then [B4].Resize(say, 3) = b
MsgBox "İşlem tamam...", vbInformation
End Sub
Buyurun.Hata verdi.
Sub Düğme2_Tıklat()
Dim a, i As Long, sonsat As Long
Range("B:C").ClearContents
sonsat = Cells(Rows.Count, "A").End(xlUp).Row
For i = 4 To sonsat
If Cells(i, "A").Value <> "" Then
a = Split(Cells(i, "A").Value)
Cells(i, "C").Value = a(UBound(a) - 1)
Cells(i, "B").Value = a(UBound(a) - 2)
End If
Next
MsgBox "BİTTİ"
End Sub