• DİKKAT

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

Soru if koşulum false olmasına rağmen kod bloğunun içerisini okuyor

Katılım
14 Eylül 2020
Mesajlar
34
Excel Vers. ve Dili
2019
If Not IsEmpty(h_codes) Then -->> change event'inin içerisindeki bu kod parcasının h_codes boş ve false dönüyor fakat aşagıdaki kodu okuyor
solunumKontrolSayisal = SolunumKontrolBand(h_codes)
MsgBox solunumKontrolSayisal
If solunumKontrolSayisal = 0 Then
solunumKontrolMetinsel = "A"
ElseIf solunumKontrolSayisal > 0 And solunumKontrolSayisal < 10 Then
solunumKontrolMetinsel = "B"
ElseIf solunumKontrolSayisal >= 10 And solunumKontrolSayisal <= 1000 Then
solunumKontrolMetinsel = "C"
ElseIf solunumKontrolSayisal >= 1000 And solunumKontrolSayisal < 10000 Then
solunumKontrolMetinsel = "D"
ElseIf solunumKontrolSayisal >= 10000 Then
solunumKontrolMetinsel = "E"
End If
Cells(Target.Row, Range("A1:AF1").Find("Solunum Kontrol Bandı").Column) = solunumKontrolMetinsel
End If
 
Örnek dosya paylaşır mısınız?
 
If Len(Trim(Cells(i, 1).Value))=0 Then Msgbox "Empty" bu kodu kullanıyorum artık daha sağlıklı IsEmpty'den
 
IsEmpty komutu değişkenin boş olma durumunu kontrol eder. Eğer başına Not eklerseniz bu sefer boş değilse anlamına gelir.

Not IsEmpty = Boş Değilse
 
Geri
Üst