» » Soru 13

Soru 13

13. sorumuzla devam edelim.

Aşağıdaki gibi bir tablomuz var.

Girdimiz soldaki tablo. Bu tabloda bazı noktalar boş. Biz sağdaki tabloyu elde etmek istiyoruz. Boş değerleri almıyoruz.

Dosyayı buradan indirebilir, cevaplarınızı yorum olarak yazabilirsiniz.


CEVAP

Doğru çözümler için tebrik ederim. Orta’nın üzerinde bir zorlukta olan bu soruya, bu kadar doğru cevap gelmesi sevindirdi beni…

For i = 4 To 10
For y = 4 To 7
sonsatir = Cells(Rows.Count, "J").End(xlUp).Row + 1

If Cells(i, y) <> "" Then
Cells(sonsatir, 10) = Cells(i, 3)
Cells(sonsatir, 11) = Cells(3, y)
Cells(sonsatir, 12) = Cells(i, y)
End If

Next y
Next i
Categories: SoruYorum

14 Responses

  • Sub liste()

    ss = Cells(Rows.Count, 10).End(xlUp).Row

    For i = 4 To 10

    If Cells(i, 4) “” Then
    ss = ss + 1
    Cells(ss, 10) = Cells(i, 3)
    Cells(ss, 11) = Cells(3, 4)
    Cells(ss, 12) = Cells(i, 4)

    End If

    If Cells(i, 5) “” Then
    ss = ss + 1
    Cells(ss, 10) = Cells(i, 3)
    Cells(ss, 11) = Cells(3, 5)
    Cells(ss, 12) = Cells(i, 5)

    End If

    If Cells(i, 6) “” Then
    ss = ss + 1
    Cells(ss, 10) = Cells(i, 3)
    Cells(ss, 11) = Cells(3, 6)
    Cells(ss, 12) = Cells(i, 6)

    End If

    If Cells(i, 7) “” Then
    ss = ss + 1
    Cells(ss, 10) = Cells(i, 3)
    Cells(ss, 11) = Cells(3, 7)
    Cells(ss, 12) = Cells(i, 7)

    End If

    Next i

    End Sub

  • =İNDİS($C$3:$G$10;KAÇINCI(J4;$C$3:$C$10;0);KAÇINCI(K4;$C$3:$G$3;0))

    =TOPLA.ÇARPIM((J4=$C$4:$C$10)*(K4=$D$3:$G$3)*($D$4:$G$10))

  • Dim hucre As Range
    Dim alan As Range
    Dim satir As Byte

    Set alan = Range(“D4:G10”)
    satir = 4

    For Each hucre In alan
    If IsEmpty(hucre) = False Then
    Cells(satir, 10) = Cells(hucre.Row, 3)
    Cells(satir, 11) = Cells(3, hucre.Column)
    Cells(satir, 12) = hucre
    satir = satir + 1
    End If
    Next hucre

  • Merhaba,
    10 satırlık kodlar 🙂
    Sub soru_13()
    For x = 4 To Range(“C” & Rows.Count).End(xlUp).Row
    For y = 4 To 7
    jSon = Range(“J” & Rows.Count).End(xlUp).Row + 1
    If Cells(x, y) Empty Then
    Cells(jSon, “J”) = Cells(x, “C”)
    Cells(jSon, “K”) = Cells(3, y)
    Cells(jSon, “L”) = Cells(x, y)
    End If
    Next y
    Next x
    End Sub

  • Merhaba,

    Şehirleri sıralamak için aşağıdaki dizi formülü J4 hücresine,

    =İNDİS($C$4:$C$10;KÜÇÜK(EĞER($D$4:$G$10>0;SATIR($C$4:$C$10)-3;””);SATIR(A1)))

    Yılları sıralamak için aşağıdaki dizi formülü K4 hücresine,

    =İNDİS($D$3:$G$3;KÜÇÜK(EĞER(KAYDIR($C$4;KAÇINCI($N4;$C$4:$C$10;0)-1;1;;SÜTUNSAY($D$3:$G$3))>0;SÜTUN($D$3:$G$3)-SÜTUN($C$3));EĞERSAY($N$4:N4;N4)))

    Değerleri sıralamak için aşağıdaki formülü L4 hücresine,

    =TOPLA.ÇARPIM(($C$4:$C$10=$N4)*($D$3:$G$3=$O4)*($D$4:$G$10))

  • =EĞERHATA(İNDİS($C$1:$C$10;KÜÇÜK(EĞER($D$4:$G$10″”;SATIR($D$4:$G$10));SATIRSAY($J$4:J4)));””)

    =EĞERHATA(İNDİS(KAYDIR($C$1;2;1;1;4);0;KÜÇÜK(EĞER(KAYDIR($C$1;KAÇINCI(J4;$C$1:C4;0)-1;1;1;4)””;SÜTUN(KAYDIR($C$1;KAÇINCI(J4;$C$1:C4;0)-1;1;1;4))-3);EĞERSAY($J$4:J4;J4)));””)

    =EĞERHATA(İNDİS(KAYDIR($C$1;KAÇINCI(J4;$C$1:C4;0)-1;1;1;4);0;KÜÇÜK(EĞER(KAYDIR($C$1;KAÇINCI(J4;$C$1:C4;0)-1;1;1;4)””;SÜTUN(KAYDIR($C$1;KAÇINCI(J4;$C$1:C4;0)-1;1;1;4))-3);EĞERSAY($J$4:J4;J4)));””)

    sırasıyla şehir,yıl,değer için yazılıp alta çekilir hepsi crtl+shift+enter ile yazılır

  • Sub soru_13()

    Dim r As Long
    Dim i As Long
    Dim sonsatir As Long
    Dim a As Long

    sonsatir = Range(“C” & Rows.Count).End(xlUp).Row

    a = 4

    For i = 4 To sonsatir

    For r = 4 To 7

    If Cells(i, r) “” Then

    Range(“O” & a) = Cells(i, r).Offset(3 – i, 0).Value
    Range(“P” & a) = Cells(i, r)
    Range(“N” & a) = Cells(i, r).Offset(0, 3 – r).Value

    a = a + 1

    End If

    Next r
    Next i

    End Sub

  • Hocam merhaba,

    Verileri power query ye aldıktan sonra şehir sütununu seçiyoruz ve Unpivot Coumns > Unpivot Other Colums a tıklayarak bu tabloyu elde edebiliriz.

  • Sub deneme()
    m = 0
    For sat = 4 To 10
    For sut = 4 To 7
    If Cells(sat, sut) “” Then
    Cells(4 + m, 10) = Cells(sat, 3)
    Cells(4 + m, 11) = Cells(3, sut)
    Cells(4 + m, 12) = Cells(sat, sut)
    m = m + 1
    End If
    Next sut
    Next sat
    End Sub

  • A18:C18 Arasında başlıkları yazdım

    Makro aşağıdaki gibidir.
    Sub gtr()
    y = 19
    For i = 4 To 10
    For x = 4 To 7

    If Cells(i, x) > 0 Then
    Cells(y, 1) = Cells(i, 3)
    Cells(y, 2) = Cells(3, x)
    Cells(y, 3) = Cells(i, x)
    y = y + 1
    End If
    Next x
    Next i

    End Sub

  • merhabalar
    soru 13 için çözümüm

    Sub bulma()
    For i = 2 To 8
    For x = 2 To 5
    If Sayfa1.Cells(i, x) “” Then
    t = Sayfa1.Cells(Rows.Count, “h”).End(xlUp).Row
    Sayfa1.Cells(t + 1, 8).Value = Sayfa1.Cells(i, 1).Value
    Sayfa1.Cells(t + 1, 9).Value = Sayfa1.Cells(1, x).Value
    Sayfa1.Cells(t + 1, 10).Value = Sayfa1.Cells(i, x).Value
    End If
    Next x
    Next i
    End Sub

  • If Sayfa1.Cells(i, x) “” Then olacak
    kopyalarken yazılmamış

  • If Sayfa1.Cells(i, x) küçük ve büyük sembolu yanyana“” Then olacak
    kopyalarken burası siliyor küçük ve büyük sembolünü yazılmamış gözüküyor

  • =İNDİS($C$3:K10;KAÇINCI(R4;$C$3:$C$10;0);KAÇINCI(S4;$C$3:$G$3;0);1)

X