• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Belli harfi içeren kelimelerin yan sütuna taşınması

Katılım
26 Nisan 2019
Mesajlar
161
Excel Vers. ve Dili
Excel 2019 64 bit Tr
D sütununda 1000'den fazla kelimem var. Bu kelimelerden örneğin içinde "B" harfi olanları E sütununa taşımak istiyorum. Bunu makro ile nasıl yapabilirim?
 
Alternatif.

Kod:
Sub bul()
son = [D65000].End(3).Row
Range("E2:R65000").ClearContents

For t = 1 To son
    For s = 1 To Len(Cells(t, "D"))
        x = Mid(Cells(t, "D"), s, 1)
        If x = "B" Then
            Cells(t, "E") = Cells(t, "D")
        End If
    Next
Next

End Sub
 
Selamlar

bir alternatif de bu olsun

Kod:
Sub bul_Aktar()

Dim sonsat As Long
Dim i As Long, n As Integer
Dim ara As Range

    Range("E2:E1000").ClearContents
    sonsat = Cells(Rows.Count, "D").End(xlUp).Row
    n = 2
        For i = 2 To sonsat
           Set ara = Cells(i, "D").Find("*b*")
        '   Set ara = Range("D" & i).Find("*b*")
            If Not ara Is Nothing Then
                Cells(n, "E") = ara
                n = n + 1
            End If
        Next i
End Sub
 
Selamlar

bir alternatif de bu olsun

Kod:
Sub bul_Aktar()

Dim sonsat As Long
Dim i As Long, n As Integer
Dim ara As Range

    Range("E2:E1000").ClearContents
    sonsat = Cells(Rows.Count, "D").End(xlUp).Row
    n = 2
        For i = 2 To sonsat
           Set ara = Cells(i, "D").Find("*b*")
        '   Set ara = Range("D" & i).Find("*b*")
            If Not ara Is Nothing Then
                Cells(n, "E") = ara
                n = n + 1
            End If
        Next i
End Sub


Çok teşekür ederim.
 
Rica ederim.
İyi çalışmalar
 
Geri
Üst