muhsar
Altın Üye
- Katılım
- 16 Mart 2019
- Mesajlar
- 270
- Excel Vers. ve Dili
- 2010 tütkçe
- Altın Üyelik Bitiş Tarihi
- 21-03-2029
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Or Target.Row < 2 Then Exit Sub
Set ahl = Sheets("AKTİF")
fsat = Target.Row: deg = Target.Value
If WorksheetFunction.CountIf(ahl.[A:A], deg) > 0 Then
ahlsat = WorksheetFunction.Match(deg, ahl.[A:A], 0)
Cells(fsat, "B") = ahl.Cells(ahlsat, "P")
Cells(fsat, "C") = ahl.Cells(ahlsat, "Q")
Cells(fsat, "D") = ahl.Cells(ahlsat, "H")
Cells(fsat, "E") = ahl.Cells(ahlsat, "T")
Cells(fsat, "J") = ahl.Cells(ahlsat, "T")
Cells(fsat, "K") = ahl.Cells(ahlsat, "U")
Cells(fsat, "L") = ahl.Cells(ahlsat, "H")
Cells(fsat, "H") = ahl.Cells(ahlsat, "A")
Else
Range("B" & fsat & ",C" & fsat & ",D" & fsat & ",E" & fsat & ",J" & fsat & ",K" & fsat & ",L" & fsat & ",H" & fsat).ClearContents
End If
End Sub
yukarıdaki kodda Cells(fsat, "B") = ahl.Cells(ahlsat, "P") ile ismi; Cells(fsat, "C") = ahl.Cells(ahlsat, "Q") kod ilede soyismi getiriyorum.
yapmak isteyip yapamadığım ise Cells(fsat, "B") = ahl.Cells(ahlsat, "P") ile Cells(fsat, "B") = ahl.Cells(ahlsat, "P") kodun birleşimini yaparak
I sütununa getirmek. kısaca isim soyisim arasına boşluk koyarak birleşik getirmek istiyorum.umarım anlatabilmişimdir.
Sheets("AKTİF") de (P) isim; (Q) soyisim yer alıyor