• DİKKAT

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

VBA kod yardımı

Mehmet Sait

Altın Üye
Katılım
19 Ekim 2009
Mesajlar
840
Excel Vers. ve Dili
Office 2016 TR
Merhabalar,

Çalışma sayfamın kod bölümünde bulunan bu kod ile F hücresi değiştiğinde M hücresini temizliyor. Bu koda F hücresi değiştiğinde birde G hücresininde temizlemesini istiyorum ama koda ekleme yapamadım.

Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
    Cells(Target.Row, "M") = ""
End Sub

Yardımlarınız için teşekkür ederim
 
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
Cells(Target.Row, "M") = ""
Cells(Target.Row, "G") = ""
End Sub
 
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
Cells(Target.Row, "M") = ""
Cells(Target.Row, "G") = ""
End Sub

Hocam, emeğinize sağlık teşekkür ederim. Denedim oldu. Teşekkür ederim.

F Hücresi silindiğinde G ile M temizlensin eğer sadece G hücreside silinirse M yine temizlensin
Bu şekilde revize etmek istedim ama yapamadım.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [G11:G45]) Is Nothing Then Exit Sub
Cells(Target.Row, "M") = ""
If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
Cells(Target.Row, "G") = ""
Cells(Target.Row, "M") = ""
End Sub

Teşekkür ederim.
 
C++:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, [G11:G45]) Is Nothing Then GoTo ATLA
    Cells(Target.Row, "M") = ""
    Exit Sub
ATLA:
    If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
    Cells(Target.Row, "G") = ""
    Cells(Target.Row, "M") = ""
End Sub
 
C++:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, [G11:G45]) Is Nothing Then GoTo ATLA
    Cells(Target.Row, "M") = ""
    Exit Sub
ATLA:
    If Intersect(Target, [F11:F45]) Is Nothing Then Exit Sub
    Cells(Target.Row, "G") = ""
    Cells(Target.Row, "M") = ""
End Sub

Emeğinize sağlık, teşekkür ederim hocam.
 
Geri
Üst