• DİKKAT

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

Hücre seçilince diğer hücreyi doldurmak zorunlu olsun

Katılım
15 Kasım 2008
Mesajlar
64
Excel Vers. ve Dili
2007 Excel İngilizce
Merhaba,
Ekteki dosyada P sütununda others - with explanation seçildiği zaman S sütununa data girişinin zorunlu olmasını istiyoruz.

bunu nasıl sağlayabiliriz.
 

Ekli dosyalar

Biraz uğraştım ama oldu galiba, sayfanın kod bölümüne kopyalayın.

Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("p5:p100")) Is Nothing Then Exit Sub
If Target.Value = "others - with explanation" Then Target(1, 4).Select
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static EskiHucre As Range
If Not EskiHucre Is Nothing Then
If EskiHucre.Column <> "19" Then GoTo git
If EskiHucre = "" And EskiHucre.Offset(0, -3).Value = "others - with explanation" Then
Beep: EskiHucre.Select: Exit Sub
End If
End If
git:
Set EskiHucre = Target
End Sub
 

Ekli dosyalar

Geri
Üst