DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub satır_sütun_gizle()
Application.ScreenUpdating = False
ssat = Range("a65536").End(3).Row
For i = 2 To ssat
If Not Cells(i, "h").Text = "x" Then
Rows(i).EntireRow.Hidden = True
Else:
For j = 2 To 7
If Cells(i, j).Text = "K" Then
Columns(j).EntireColumn.Hidden = True
End If
Next
End If
Next
Application.ScreenUpdating = True
End Sub
Sub tümünü_göster()
Cells.EntireRow.Hidden = False
Cells.EntireColumn.Hidden = False
End Sub
Option Explicit
Sub gizle()
Dim u As Long, S As Byte
Application.ScreenUpdating = False
Cells.EntireColumn.Hidden = False
Cells.EntireRow.Hidden = False
For u = 2 To Range("A65536").End(3).Row
For S = 2 To Range("IV2").End(1).Column
If Cells(u, "H") <> "x" Then Rows(u).EntireRow.Hidden = True
If Cells(u, "H") = "x" And Cells(u, S) = "K" Then
Columns(S).EntireColumn.Hidden = True
End If
Next
Next
Application.ScreenUpdating = True
End Sub
İlk kod hatasız çalışıyor, ikinci kod ise önce çalıştı, sonradan çalışmıyor. İlk kod işimi gördü; tüm yanıtlar için teşekkür ederim.
son sütunu bulurken IV2 değil IV1 kullanılınca çalıştı. Sanırım ilk satır boş olduğunda bu hatayı veriyordu; şimdi başlık satırının son dolu sütununu bulduğu için hata vermiyor.
For S = 2 To Range("IV2").End(1).Column yerine
For S = 2 To Range("IV1").End(1).Column yazdım
Teşekkürler