sutun içindeki belli bir karakter ile sıralama

Katılım
26 Mart 2017
Mesajlar
31
Excel Vers. ve Dili
excel 2013
Merhaba youtube playlistin içindeki title=) yazan sayıya göre sıralama yapamadım yardımcı olur musunuz teşekkürler...



burdaki sayılar link bozulmayacak şekilde ;title=1),title=2) şeklinde sıralanması gerek bunun için bir formul , makro vs.. nasıl yapabilirim çok teşekkür ederim...

örnek;
http://dosya.co/ijcvubw1h0rq/örnek.xlsx.html
 
Son düzenleme:

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,843
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
B Sutün yardımcı olarak kullanılmıştır.

kod:

Kod:
Sub sırala()
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Columns("b").ClearContents

For r = 1 To Cells(Rows.Count, "a").End(3).Row

AlinacakVeri = "title"
adres = Cells(r, 1).Value
say = InStr(Trim(adres), AlinacakVeri)
adres2 = WorksheetFunction.Trim(Mid(adres, say + 6, Len(adres)))
deg = InStr(Trim(adres2), ")")
Cells(r, "b").Value = WorksheetFunction.Trim(Mid(adres2, 1, deg - 1))
Next r

ad = 1 & ":" & Cells(Rows.Count, "a").End(3).Row
Rows(ad).Select
Rows(ad).Sort Key1:=Cells(2), Order1:=xlAscending
Columns("b").ClearContents
Range("b1").Select
Application.ScreenUpdating = True
Application.DisplayAlerts = True

MsgBox "işlem tamam"

End Sub
 
Katılım
26 Mart 2017
Mesajlar
31
Excel Vers. ve Dili
excel 2013
B Sutün yardımcı olarak kullanılmıştır.

kod:

Kod:
Sub sırala()
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Columns("b").ClearContents

For r = 1 To Cells(Rows.Count, "a").End(3).Row

AlinacakVeri = "title"
adres = Cells(r, 1).Value
say = InStr(Trim(adres), AlinacakVeri)
adres2 = WorksheetFunction.Trim(Mid(adres, say + 6, Len(adres)))
deg = InStr(Trim(adres2), ")")
Cells(r, "b").Value = WorksheetFunction.Trim(Mid(adres2, 1, deg - 1))
Next r

ad = 1 & ":" & Cells(Rows.Count, "a").End(3).Row
Rows(ad).Select
Rows(ad).Sort Key1:=Cells(2), Order1:=xlAscending
Columns("b").ClearContents
Range("b1").Select
Application.ScreenUpdating = True
Application.DisplayAlerts = True

MsgBox "işlem tamam"

End Sub
Çok çok teşekkür ederim.
 
Katılım
26 Mart 2017
Mesajlar
31
Excel Vers. ve Dili
excel 2013
B Sutün yardımcı olarak kullanılmıştır.

kod:

Kod:
Sub sırala()
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Columns("b").ClearContents

For r = 1 To Cells(Rows.Count, "a").End(3).Row

AlinacakVeri = "title"
adres = Cells(r, 1).Value
say = InStr(Trim(adres), AlinacakVeri)
adres2 = WorksheetFunction.Trim(Mid(adres, say + 6, Len(adres)))
deg = InStr(Trim(adres2), ")")
Cells(r, "b").Value = WorksheetFunction.Trim(Mid(adres2, 1, deg - 1))
Next r

ad = 1 & ":" & Cells(Rows.Count, "a").End(3).Row
Rows(ad).Select
Rows(ad).Sort Key1:=Cells(2), Order1:=xlAscending
Columns("b").ClearContents
Range("b1").Select
Application.ScreenUpdating = True
Application.DisplayAlerts = True

MsgBox "işlem tamam"

End Sub
Hocam, size örnekte vermiş olduğum dosya haricinde başka playlistlerde yapamadım yardım eder misiniz

almış olduğum hata ;

 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,843
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
Kod örnek dosyanızda çalışıyor

kodun çalışmadığı dosyayı yükleyin bir bakalım.
 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,843
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
İlgili dosyadaki sayfada 11 ve 20 satırdaki veriler de title den sonra sayı yok onun için kod hata veriyor

Bu kodu bir dene kırmızı bölümün başındaki tırnak işaretini kaldırırsanız B sutündaki veriler silinecektir.

Kod:
Sub sırala()
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Columns("b").ClearContents
On Error Resume Next
For r = 1 To Cells(Rows.Count, "a").End(3).Row

AlinacakVeri = "title"
adres = Cells(r, 1).Value
say = InStr(Trim(adres), AlinacakVeri)
adres2 = WorksheetFunction.Trim(Mid(adres, say + 6, Len(adres)))
deg = InStr(Trim(adres2), "%")
Cells(r, "b").Value = Replace(WorksheetFunction.Trim(Mid(adres2, 1, deg - 1)), ")", "")
Next r
MsgBox 1
ad = 1 & ":" & Cells(Rows.Count, "a").End(3).Row
Rows(ad).Select
Rows(ad).Sort Key1:=Cells(2), Order1:=xlAscending
[COLOR="Red"]'Columns("b").ClearContents[/COLOR]
Range("b1").Select
Application.ScreenUpdating = True
Application.DisplayAlerts = True

MsgBox "işlem tamam"

End Sub
 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,843
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
kod işinizi gördü mü ?
 
Üst