- Katılım
- 6 Eylül 2007
- Mesajlar
- 657
- Excel Vers. ve Dili
- excel 2016 32 Bit ve Excel 2020 32 Bit Türkçe ve İngilizce
Merhaba arkadaşlar, Çalışmış olduğum bir excel kitapçığında bir sayfaya çeşitli "Group" lar getirmek istiyorum. Aşağıda örneği bulunan formül ile bu işlemi yaptırıyorum. Ancak bir sorun oluştu şöyleki; Aşağıdaki formülde ( Örnek olarak bir group koydum ancak gerçeğinde group sayıları fazla) "If/End If " en fazla 113 adet işlem yapıyor. 113 adetten fazla If/End If olduğunda aşağıdaki örnek'te görüldüğü şekilde "Procedure Too Large" sinyali veriyor. Benim daha fazla "group" belirlemem gerekiyor! bunun bir çaresi varmı acaba? Bu konuda yardımınızı istiyorum.Teşekkürler.
Örnek:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Sayfa105.Range("J16") = 1 Then
ActiveSheet.Shapes("Group 227").Visible = False
ActiveSheet.Shapes("Group 183").Visible = False
ActiveSheet.Shapes("Group 146").Visible = False
ActiveSheet.Shapes("Group 113").Visible = True
Else
If Sayfa105.Range("J16") = 2 Then
ActiveSheet.Shapes("Group 225").Visible = False
ActiveSheet.Shapes("Group 30").Visible = False
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 3 Then
ActiveSheet.Shapes("Group 225").Visible = False
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 4 Then
ActiveSheet.Shapes("Group 225").Visible = True
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 5 Then
ActiveSheet.Shapes("Group 225").Visible = True
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
End If
End If
End If
End If
End If
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 1 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = False
ActiveSheet.Shapes("Group 4754").Visible = False
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = False
ActiveSheet.Shapes("Group 4115").Visible = False
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 2 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = False
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = False
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 3 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = True
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = True
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") > 3 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = True
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = True
End If
End If
End If
End If
End Sub
Örnek:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Sayfa105.Range("J16") = 1 Then
ActiveSheet.Shapes("Group 227").Visible = False
ActiveSheet.Shapes("Group 183").Visible = False
ActiveSheet.Shapes("Group 146").Visible = False
ActiveSheet.Shapes("Group 113").Visible = True
Else
If Sayfa105.Range("J16") = 2 Then
ActiveSheet.Shapes("Group 225").Visible = False
ActiveSheet.Shapes("Group 30").Visible = False
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 3 Then
ActiveSheet.Shapes("Group 225").Visible = False
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 4 Then
ActiveSheet.Shapes("Group 225").Visible = True
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
Else
If Sayfa105.Range("J16") = 5 Then
ActiveSheet.Shapes("Group 225").Visible = True
ActiveSheet.Shapes("Group 30").Visible = True
ActiveSheet.Shapes("Group 22").Visible = True
ActiveSheet.Shapes("Group 15").Visible = True
End If
End If
End If
End If
End If
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 1 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = False
ActiveSheet.Shapes("Group 4754").Visible = False
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = False
ActiveSheet.Shapes("Group 4115").Visible = False
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 2 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = False
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = False
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") = 3 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = True
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = True
Else
If Sayfa18.Range("C13") = 0 And Sayfa105.Range("J619") > 3 Then
ActiveSheet.Shapes("Group 4744").Visible = True
ActiveSheet.Shapes("Group 4111").Visible = True
ActiveSheet.Shapes("Group 4754").Visible = True
ActiveSheet.Shapes("Group 2412").Visible = True
ActiveSheet.Shapes("Group 4117").Visible = True
ActiveSheet.Shapes("Group 4115").Visible = True
End If
End If
End If
End If
End Sub
Ekli dosyalar
Son düzenleme:
