• DİKKAT

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

Aynı satırları birleştirme

  • Konbuyu başlatan Konbuyu başlatan xtrkax
  • Başlangıç tarihi Başlangıç tarihi
Katılım
16 Temmuz 2014
Mesajlar
74
Excel Vers. ve Dili
2010 TR
Merhaba arkadaşlar resimde ki gibi aynı olan satırların değerlerini de toplayarak tek bir satırda nasıl toplarız? Yani mesela seçili olan kalemle çizdiğim yer tek satırda birleşecek rakamda sağında ki hücrede toplanmış olacak.

resim ekte küçülmüş resim tam hali:

(halloldu)
 
Son düzenleme:
Merhaba
Dosyayınızı yedekleyerek aşağıdaki kodu denermisiniz?
Resimde "B" ve "c" sütunlarını görebildiğim için iki sütun içindir
Olmazsa http://s3.dosya.tc/ örnek dosya ekleyip indirme adresi verirsiniz.
Kod:
 Private Sub CommandButton1_Click()
a = Cells(Rows.Count, "b").End(xlUp).Row
Range("B2:C" & a).Sort Key1:=Cells(2, 3), Order1:=xlDescending
Range("B2:C" & a).Sort Key1:=Cells(2, 2), Order1:=xlAscending
For x = a To 2 Step -1
If IsNumeric(Cells(x - 1, 3)) = True And IsNumeric(Cells(x, 3)) = True Then
If Trim(Cells(x - 1, 2).Value) = Trim(Cells(x, 2).Value) Then
Cells(x - 1, 3) = Cells(x - 1, 3) + Cells(x, 3)
Range("b" & x & ":c" & x) = ""
End If
End If
If IsNumeric(Cells(x, 3)) = False Or Cells(x, 3) = "" Then Range("b" & x & ":c" & x) = ""
Next
a = Cells(Rows.Count, "b").End(xlUp).Row
Range("B2:C" & a).Sort Key1:=Cells(2, 2), Order1:=xlAscending
End Sub
 
Merhaba
Dosyayınızı yedekleyerek aşağıdaki kodu denermisiniz?
Resimde "B" ve "c" sütunlarını görebildiğim için iki sütun içindir
Olmazsa http://s3.dosya.tc/ örnek dosya ekleyip indirme adresi verirsiniz.
Kod:
 Private Sub CommandButton1_Click()
a = Cells(Rows.Count, "b").End(xlUp).Row
Range("B2:C" & a).Sort Key1:=Cells(2, 3), Order1:=xlDescending
Range("B2:C" & a).Sort Key1:=Cells(2, 2), Order1:=xlAscending
For x = a To 2 Step -1
If IsNumeric(Cells(x - 1, 3)) = True And IsNumeric(Cells(x, 3)) = True Then
If Trim(Cells(x - 1, 2).Value) = Trim(Cells(x, 2).Value) Then
Cells(x - 1, 3) = Cells(x - 1, 3) + Cells(x, 3)
Range("b" & x & ":c" & x) = ""
End If
End If
If IsNumeric(Cells(x, 3)) = False Or Cells(x, 3) = "" Then Range("b" & x & ":c" & x) = ""
Next
a = Cells(Rows.Count, "b").End(xlUp).Row
Range("B2:C" & a).Sort Key1:=Cells(2, 2), Order1:=xlAscending
End Sub

Merhabalar öncelikle çok teşekkür ederim dosyam linktedir. B ve C sutunlarında aynı satırların toplamını görmek istiyorum. Verdiğiniz kod ile başaramadım

http://s3.dosya.tc/server7/peg7jk/Sucuk_Satis_Raporu.xlsx.html
 
Geri
Üst