Soru Dikey listeleri yataya çevirme

lovecaroline

Altın Üye
Katılım
21 Mayıs 2014
Mesajlar
136
Excel Vers. ve Dili
2013 (64 Bit)
2010 (64 bit)
Altın Üyelik Bitiş Tarihi
07.06.2026
Makro ile ekteki listede yer ilk sayfadaki gibi bir liste ikinci sayfadaki hale getirebilir mi?
Şimdiden teşekkürler.
 

lovecaroline

Altın Üye
Katılım
21 Mayıs 2014
Mesajlar
136
Excel Vers. ve Dili
2013 (64 Bit)
2010 (64 bit)
Altın Üyelik Bitiş Tarihi
07.06.2026
Listeler uzun olabilir. Yatay olarak sağ tarafa doğru listelensin istiyorum. Tekrardan teşekkürler.
 

Ekli dosyalar

Orion1

Uzman
Uzman
Katılım
1 Mart 2005
Mesajlar
22,254
Excel Vers. ve Dili
Win7 Home Basic TR 64 Bit

Ofis-2010-TR 32 Bit
Buyurun.
Kod:
Sub yatay()
Dim i As Long, sut As Integer, sat As Long
Dim sh As Worksheet
Sheets("Soru").Select
Set sh = Sheets("isteğim")
sh.Range("A1:Z" & Rows.Count).ClearContents
For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
    If Range("A" & i).Font.Bold Then
        sut = sut + 1
        sat = 1
        sh.Cells(sat, sut).Value = Cells(i, "A").Value
        sh.Cells(sat, sut).Font.Bold = True
    Else
        sat = sat + 1
        sh.Cells(sat, sut).Value = Cells(i, "A").Value
    End If
Next
sh.Select
MsgBox "Bitti"
End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
41,588
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Alternatif;

C++:
Option Explicit

Sub Transpose_Aktar()
    Dim S1 As Worksheet, S2 As Worksheet, Son As Long, Say As Long
    Dim Veri As Variant, X As Long, Aranan As Range, Bul As Range
    
    Set S1 = Sheets("soru")
    Set S2 = Sheets("isteğim")
    
    S2.Cells.Clear
    
    Son = S1.Cells(S1.Rows.Count, 2).End(3).Row
    If Son < 3 Then Son = 3
    
    Veri = S1.Range("B2:B" & Son).Value
    
    With CreateObject("Scripting.Dictionary")
        For X = LBound(Veri, 1) To UBound(Veri, 1)
            If Not .Exists(Veri(X, 1)) Then
                .Add Veri(X, 1), Nothing
            End If
        Next
        
        S2.Range("A1").Resize(, .Count) = .Keys
    End With
    
    For Each Aranan In S2.Range("A1").CurrentRegion
        Set Bul = S1.Range("B:B").Find(Aranan.Value, , , xlWhole)
        If Not Bul Is Nothing Then
            Say = WorksheetFunction.CountIf(S1.Range("B:B"), Aranan.Value)
            Aranan.Offset(1).Resize(Say).Value = S1.Range("C" & Bul.Row & ":C" & Bul.Row + Say - 1).Value
        End If
    Next

    S2.Select
    
    Set Bul = Nothing
    Set S1 = Nothing
    Set S2 = Nothing

    MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
 
Üst