İyi Günler;
"Toplam" sayfasının "P" sutundaki toplamı "isimyıltoplam" sayfasındaki C sutundaki isim yanındaki "D" sutuna aşağıdaki makro ile aktarmaktayım.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, [C2:C1900]) Is Nothing Then Exit Sub
If Target.Value = Empty Then Exit Sub
Set s1 = Sheets("İsimyıltoplam"): Set s2 = Sheets("toplam")
For Each bul In s2.Range("C6:C1500")
If bul = Target.Value Then sat = bul.Row
Next
If sat = "" Then
MsgBox "ARADIĞINIZ BİLGİ BULUNAMADI.", vbInformation, "BİLGİ"
Exit Sub
End If
s1.Cells(Target.Row, "D").Value = s2.Cells(sat, "p").Value
Set s1 = Nothing
Set s2 = Nothing
End Sub
Ancak, yukarıdaki makroyu düğmeye uyarlamaya çalıştığımda
If Intersect(Target, Range(SonSat)) Is Nothing Then Exit Sub
range object hatası vermektedir.
Hata nerede nereden kaynaklanmaktadır.
Sub Düğme9_Tıkla()
Dim SonSat As Long
Sheets("İsimyıltoplam").Activate
SonSat = Range("C" & Rows.Count).End(xlUp).Row
If Intersect(Target, Range(SonSat)) Is Nothing Then Exit Sub
If ActiveCell.Column = 3 And Cells(ActiveCell.Row, "C") = "" Then
Exit Sub
Set s1 = Sheets("İsimyıltoplam"): Set s2 = Sheets("toplam")
For Each bul In s2.Range("C6:C1500")
If bul = Target.Value Then sat = bul.Row
Next
End If
If sat = "" Then
MsgBox "ARADIĞINIZ İSİM BULUNAMADI.", vbInformation, "BİLGİ"
Exit Sub
End If
s1.Cells(Target.Row, "D").Value = s2.Cells(sat, "P").Value
End Sub
"Toplam" sayfasının "P" sutundaki toplamı "isimyıltoplam" sayfasındaki C sutundaki isim yanındaki "D" sutuna aşağıdaki makro ile aktarmaktayım.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, [C2:C1900]) Is Nothing Then Exit Sub
If Target.Value = Empty Then Exit Sub
Set s1 = Sheets("İsimyıltoplam"): Set s2 = Sheets("toplam")
For Each bul In s2.Range("C6:C1500")
If bul = Target.Value Then sat = bul.Row
Next
If sat = "" Then
MsgBox "ARADIĞINIZ BİLGİ BULUNAMADI.", vbInformation, "BİLGİ"
Exit Sub
End If
s1.Cells(Target.Row, "D").Value = s2.Cells(sat, "p").Value
Set s1 = Nothing
Set s2 = Nothing
End Sub
Ancak, yukarıdaki makroyu düğmeye uyarlamaya çalıştığımda
If Intersect(Target, Range(SonSat)) Is Nothing Then Exit Sub
range object hatası vermektedir.
Hata nerede nereden kaynaklanmaktadır.
Sub Düğme9_Tıkla()
Dim SonSat As Long
Sheets("İsimyıltoplam").Activate
SonSat = Range("C" & Rows.Count).End(xlUp).Row
If Intersect(Target, Range(SonSat)) Is Nothing Then Exit Sub
If ActiveCell.Column = 3 And Cells(ActiveCell.Row, "C") = "" Then
Exit Sub
Set s1 = Sheets("İsimyıltoplam"): Set s2 = Sheets("toplam")
For Each bul In s2.Range("C6:C1500")
If bul = Target.Value Then sat = bul.Row
Next
End If
If sat = "" Then
MsgBox "ARADIĞINIZ İSİM BULUNAMADI.", vbInformation, "BİLGİ"
Exit Sub
End If
s1.Cells(Target.Row, "D").Value = s2.Cells(sat, "P").Value
End Sub
