Soru 7

7. sorumuzla devam edelim. Aşağıdaki resimde gördüğünüz şekilde bir tablo var.

Bu tabloda 365 güne ait rakamlar var. Buradan ay bazında toplam değerleri bulmak istiyoruz.

Sarı renkli hücreye ay numarasını yazınca, o ay’a ait toplam rakam alttaki hücreye gelecek.

Formül ya da makro kabüldür. Ancak ek sütun yapmadan bu işlemi yapmalısınız.

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


CEVAP

{=TOPLA(EĞER(AY($A$2:$A$366)=D1;$B$2:$B$366;0))}

Burada en iyi yöntem dizi formülüdür. Formülü yazdıktan sonra ctrl+shift+enter tuşlarına aynı anda basmalısınız.

Similar Posts

12 Comments

  1. =TOPLA(EĞER(AY($A$2:$A$366)=$D$1;$B$2:$B$366;””))

  2. =TOPLA(EĞER(AY(A2:A366)=D1;(B2:B366)))
    ctrl+shift+enter

  3. Merhabalar;

    Formül ile =TOPLA.ÇARPIM((AY(A2:A366)>=D1)*(AY(A2:A366)= Range(“D1”) And Month(dizi(x, 1)) <= Range("D1") Then

    topla = topla + dizi(x, 2)

    End If

    Next x

    Range("D2") = topla

    Set dizi = Nothing: sonA = Empty: x = Empty: topla = Empty
    End Sub

  4. =ÇOKETOPLA($B:$B;$A:$A;”>=”&TARİH(2019;$D$1;1);$A:$A;”<"&TARİH(2019;$D$1+1;1))

  5. Sub odev()

    sonuc = 0

    For i = 2 To 366

    If Cells(i, 1) >= DateValue(“1.” & Cells(1, 4) & “.2019”) And Cells(i, 1) < DateValue("1." & Cells(1, 4) + 1 & ".2019") Then

    sonuc = sonuc + Cells(i, 2)

    End If

    Next i

    Cells(5, 4) = sonuc

    End Sub

  6. Buyrun hocam. Belki daha kısadır ama ben böyle yaptım 😀

    =TOPLA(FİLTRE(B2:B366;METNEÇEVİR(A2:A366;”A”)=METNEÇEVİR(D1;”0″)))

  7. Option Explicit

    Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Target.Address = “$D$1” Then Exit Sub

    Dim ilk As Long
    Dim son As Long
    Dim satir As Long
    Dim toplam As Double

    ilk = 2
    son = Cells(Rows.Count, 1).End(xlUp).Row
    toplam = 0
    Cells(4, 4) = toplam

    For satir = ilk To son
    If Month(Cells(satir, 1)) = Cells(1, 4) Then _
    toplam = toplam + Cells(satir, 2)
    Next satir

    Cells(4, 4) = toplam
    End Sub

  8. Sub aylarasari()

    sonsatir = Cells(Rows.Count, “a”).End(xlUp).Row

    For i = 2 To sonsatir

    Cells(i, 3) = Month(Cells(i, 1))

    Next i

    Range(“d2”) = WorksheetFunction.SumIf(Range(“c:c”), Range(“d1”), Range(“b:b”))

    Range(“c2”, “c” & sonsatir).ClearContents

    End Sub

  9. Hocam şöyle bişey yaptım oldu gibi 🙂

    Option Explicit

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Dim i As Integer
    Dim kacinci As Byte
    Dim toplam As Double

    toplam = 0
    For i = 2 To 366
    kacinci = Month(Cells(i, 1))

    If kacinci = Range(“D1”) Then toplam = Cells(i, 2) + toplam
    Range(“D2”) = toplam
    Next i
    End Sub

  10. Dim ocak As Date
    Dim subat As Date
    Dim mart As Date
    Dim nisan As Date
    Dim mayis As Date
    Dim haziran As Date
    Dim temmuz As Date
    Dim agustos As Date
    Dim eylul As Date
    Dim ekim As Date
    Dim kasim As Date
    Dim aralik As Date
    ocak = “31.01.2019”
    subat = “28.02.2019”
    mart = “31.03.2019”
    nisan = “30.04.2019”
    mayis = “31.05.2019”
    haziran = “30.06.2019”
    temmuz = “31.07.2019”
    agustos = “31.08.2019”
    eylul = “30.09.2019”
    ekim = “31.10.2019”
    kasim = “30.11.2019”
    aralik = “31.12.2019”
    satir = Cells(Rows.Count, “A”).End(xlUp).Row
    toplam = 0

    For i = 2 To satir
    If Range(“d1”) = 1 And Cells(i, 1) ocak And Cells(i, 1) subat And Cells(i, 1) mart And Cells(i, 1) nisan And Cells(i, 1) mayis And Cells(i, 1) haziran And Cells(i, 1) temmuz And Cells(i, 1) agustos And Cells(i, 1) eylul And Cells(i, 1) ekim And Cells(i, 1) kasim And Cells(i, 1) <= aralik Then
    toplam = toplam + Cells(i, 2)
    End If
    Next i
    Range("d2") = toplam

Alper Düryaz için bir yanıt yazın Yanıtı iptal et

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Bu site, istenmeyenleri azaltmak için Akismet kullanıyor. Yorum verilerinizin nasıl işlendiği hakkında daha fazla bilgi edinin.