Merhabalar,
Alttaki gibi bir kod yazdım. Bu kodlar ile ne yapmak istediklerimi de alttaki kodların yanlarında ' not olarak belirttim. ilk 3 If Not çalışıyor, 4. If Not çalışmıyor. Düzeltmemde yardımcı olur musunuz. Nerede hata yapıyorum. (başka önerileriniz varsa değerlendirebilirim)
Saygılar
Alttaki gibi bir kod yazdım. Bu kodlar ile ne yapmak istediklerimi de alttaki kodların yanlarında ' not olarak belirttim. ilk 3 If Not çalışıyor, 4. If Not çalışmıyor. Düzeltmemde yardımcı olur musunuz. Nerede hata yapıyorum. (başka önerileriniz varsa değerlendirebilirim)
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error Resume Next
If Not Intersect(Target, Range("W2:W65536")) Is Nothing Then [COLOR="DarkOliveGreen"]' W sütununa sayı girilirse, X*W yap Y ye yaz[/COLOR]
sat = Target.Row
Cells(sat, "Y") = Cells(sat, "W") * Cells(sat, "X")
Else
If Not Intersect(Target, Range("AH2:AH65536")) Is Nothing Then [COLOR="DarkOliveGreen"]' AH sütununa sayı girilirse, AH*AI yap AJ ye yaz [/COLOR]
sat = Target.Row
Cells(sat, "AJ") = Cells(sat, "AH") * Cells(sat, "AI")
Else
If Not Intersect(Target, Range("AS2:AS65536")) Is Nothing Then [COLOR="DarkOliveGreen"]' AS sütununa sayı girilirse, AS*AT yap AU ye yaz [/COLOR]
sat = Target.Row
Cells(sat, "AU") = Cells(sat, "AS") * Cells(sat, "AT")
Else
If Not Intersect(Target, Range("AV2:AV65536")) Is Nothing Then [COLOR="DarkOliveGreen"]' AV sütununa değer girilirse, O-Z-AK sütunlarına bak hangisine eşit ise alttaki işlemleri yap[/COLOR]
sat = Target.Row
If Cells(Target, "AV") = Cells(Target, "O") Then [COLOR="DarkOliveGreen"]' AV sütununa girilen değer, O sütunundaki değere eşit ise alttaki hücrelere verileri getir. (Örneğin AW sütunundaki ilgili hücreye P sütunundaki ilgili hücredeki değeri getir)[/COLOR]
sat = Target.Row
Cells(sat, "AW") = Cells(sat, "P") And Cells(sat, "AX") = Cells(sat, "Q") And _
Cells(sat, "AY") = Cells(sat, "R") And Cells(sat, "AZ") = Cells(sat, "S") And _
Cells(sat, "BA") = Cells(sat, "T") And Cells(sat, "BB") = Cells(sat, "U") And _
Cells(sat, "BC") = Cells(sat, "V") And Cells(sat, "BD") = Cells(sat, "W") And _
Cells(sat, "BE") = Cells(sat, "X") And Cells(sat, "BF") = Cells(sat, "Y")
Else
If Cells(sat, "AV") = Cells(sat, "Z") Then [COLOR="DarkOliveGreen"]' AV sütununa girilen değer, Z sütunundakine eşit ise alttaki hücrelere verileri getir[/COLOR]
sat = Target.Row
Cells(sat, "AW") = Cells(sat, "AA") And Cells(sat, "AX") = Cells(sat, "AB") And _
Cells(sat, "AY") = Cells(sat, "AC") And Cells(sat, "AZ") = Cells(sat, "AD") And _
Cells(sat, "BA") = Cells(sat, "AE") And Cells(sat, "BB") = Cells(sat, "AF") And _
Cells(sat, "BC") = Cells(sat, "AG") And Cells(sat, "BD") = Cells(sat, "AH") And _
Cells(sat, "BE") = Cells(sat, "AI") And Cells(sat, "BF") = Cells(sat, "AJ")
Else
If Cells(sat, "AV") = Cells(sat, "AK") Then [COLOR="DarkOliveGreen"]' AV sütununa girilen değer, AK sütunundakine eşit ise alttaki hücrelere verileri getir[/COLOR]
sat = Target.Row
Cells(sat, "AW") = Cells(sat, "AL") And Cells(sat, "AX") = Cells(sat, "AM") And _
Cells(sat, "AY") = Cells(sat, "AN") And Cells(sat, "AZ") = Cells(sat, "AO") And _
Cells(sat, "BA") = Cells(sat, "AP") And Cells(sat, "BB") = Cells(sat, "AQ") And _
Cells(sat, "BC") = Cells(sat, "AR") And Cells(sat, "BD") = Cells(sat, "AS") And _
Cells(sat, "BE") = Cells(sat, "AT") And Cells(sat, "BF") = Cells(sat, "AU")
End If
End If
End If
End If
End If
End If
End If
Application.EnableEvents = True
End Sub
