Satırları sıralı şekilde sütüna çeviren makro talebi

veyselemre

Özel Üye
Katılım
9 Mart 2005
Mesajlar
3,642
Excel Vers. ve Dili
Pro Plus 2021
Kod:
Sub test()
    'B sütunu boş kalmalıdır.
    Dim rng As Range, r, say&
    Set rng = Range("C1").CurrentRegion
    If WorksheetFunction.CountA(rng) > 0 Then
        say = WorksheetFunction.CountA(rng)
        ReDim liste(1 To say, 1 To 1)
        say = 0
        For Each r In rng.SpecialCells(xlCellTypeConstants).Cells
            say = say + 1
            liste(say, 1) = Trim(r.Value)
        Next r
        Range("A1").Resize(say).Value = liste
    End If
End Sub
 
Katılım
27 Mayıs 2006
Mesajlar
191
Excel Vers. ve Dili
2010
Altın Üyelik Bitiş Tarihi
27-05-2024
Kod:
Sub test()
    'B sütunu boş kalmalıdır.
    Dim rng As Range, r, say&
    Set rng = Range("C1").CurrentRegion
    If WorksheetFunction.CountA(rng) > 0 Then
        say = WorksheetFunction.CountA(rng)
        ReDim liste(1 To say, 1 To 1)
        say = 0
        For Each r In rng.SpecialCells(xlCellTypeConstants).Cells
            say = say + 1
            liste(say, 1) = Trim(r.Value)
        Next r
        Range("A1").Resize(say).Value = liste
    End If
End Sub
Çok teşekkür ederim
 
Üst