oydemir
Altın Üye
- Katılım
- 22 Eylül 2007
- Mesajlar
- 278
- Excel Vers. ve Dili
- Türkçe 2016
- Altın Üyelik Bitiş Tarihi
- 07-12-2026
Sayın Veysel emre beyin yazdığı kodu kullanıyorum gayet güzel bir şekilde çalışıyor fakat veriler sıralı olmayınca verileri birleştirmiyor. B sütunundaki değerler aynı ise e sütunundaki verileri birleştir H sütununa yazmakta.
Fakat veriler sıralı olmayınca b sütunundaki verileri birleştirmiyor buna çözüm bulana bilinir mi?
Sub işlem()
Dim son&
Range("H2:H" & Rows.Count).ClearContents
son = Range("B" & Rows.Count).End(xlUp).Row
With CreateObject("Scripting.Dictionary")
For i = 2 To son
If Cells(i, "B").Value = Cells(i , "B").Value Then
.RemoveAll
For ii = i To son
If Cells(i, "B").Value = Cells(ii, "B").Value Then
.Item(Cells(ii, "E").Value) = Null
Else
Exit For
End If
Next ii
Cells(i, "H").Resize(ii - i).Value = Join(.keys, " ")
i = ii - 1
Else
Cells(i, "H").Value = Cells(i, "B").Value
End If
Next i
End With
MsgBox "İşlem TAMAM.", vbInformation
End Sub
Sub işlem()
Dim son&
Range("H2:H" & Rows.Count).ClearContents
son = Range("B" & Rows.Count).End(xlUp).Row
With CreateObject("Scripting.Dictionary")
For i = 2 To son
If Cells(i, "B").Value = Cells(i + 1, "B").Value Then
.RemoveAll
For ii = i To son
If Cells(i, "B").Value = Cells(ii, "B").Value Then
.Item(Cells(ii, "E").Value) = Null
Else
Exit For
End If
Next ii
Cells(i, "H").Resize(ii - i).Value = Join(.keys, " ")
i = ii - 1
Else
Cells(i, "H").Value = Cells(i, "B").Value
End If
Next i
End With
MsgBox "İşlem TAMAM.", vbInformation
End Sub
Fakat veriler sıralı olmayınca b sütunundaki verileri birleştirmiyor buna çözüm bulana bilinir mi?
Sub işlem()
Dim son&
Range("H2:H" & Rows.Count).ClearContents
son = Range("B" & Rows.Count).End(xlUp).Row
With CreateObject("Scripting.Dictionary")
For i = 2 To son
If Cells(i, "B").Value = Cells(i , "B").Value Then
.RemoveAll
For ii = i To son
If Cells(i, "B").Value = Cells(ii, "B").Value Then
.Item(Cells(ii, "E").Value) = Null
Else
Exit For
End If
Next ii
Cells(i, "H").Resize(ii - i).Value = Join(.keys, " ")
i = ii - 1
Else
Cells(i, "H").Value = Cells(i, "B").Value
End If
Next i
End With
MsgBox "İşlem TAMAM.", vbInformation
End Sub
Sub işlem()
Dim son&
Range("H2:H" & Rows.Count).ClearContents
son = Range("B" & Rows.Count).End(xlUp).Row
With CreateObject("Scripting.Dictionary")
For i = 2 To son
If Cells(i, "B").Value = Cells(i + 1, "B").Value Then
.RemoveAll
For ii = i To son
If Cells(i, "B").Value = Cells(ii, "B").Value Then
.Item(Cells(ii, "E").Value) = Null
Else
Exit For
End If
Next ii
Cells(i, "H").Resize(ii - i).Value = Join(.keys, " ")
i = ii - 1
Else
Cells(i, "H").Value = Cells(i, "B").Value
End If
Next i
End With
MsgBox "İşlem TAMAM.", vbInformation
End Sub
Ekli dosyalar
-
43 KB Görüntüleme: 5