Moderatori: Anthony47, Flash30005
=SE.ERRORE(INDICE($C$1:$C$172;PICCOLO(SE($G$6:$G$172="SI";RIF.RIGA($G$6:$G$172);"");RIF.RIGA(A1)));"")
=SCARTO('03-07'!$N$6;0;0;CONTA.SE('03-07'!$G$6:$G$200;"SI");1)
Private Sub Worksheet_Activate()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim ur1 As Long, ur2 As Long, ur3 As Long, i As Long, a As Long
Dim elenco() As String
Set sh1 = Sheets("03-07")
Set sh2 = Sheets("Imp")
ur1 = sh1.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To ur1
If sh1.Cells(i, 7) = UCase("si") Then
a = a + 1
ReDim Preserve elenco(1 To a)
elenco(a) = Sheets(1).Cells(i, 3)
End If
Next i
ur2 = sh1.Cells(Rows.Count, 10).End(xlUp).Row
ur3 = sh2.Cells(Rows.Count, 1).End(xlUp).Row + 1
With sh2
.Select
.Cells(ur3, 1).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Join(elenco, ",")
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End With
Set sh1 = Nothing
Set sh2 = Nothing
End Sub
Ricordati, comunque, di fare una ricerca in rete, sempre.
Set sh1 = Nothing
Set sh2 = Nothing
sh1.Range("A1").Select
etc
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
'.... inserisci qui l'intero codice precedente (ovviamente senza SUB ... END SUB)
End If
End Sub
Torna a Applicazioni Office Windows
File batch per copiare file selezionato da menu contestuale Autore: valle1975 |
Forum: Programmazione Risposte: 3 |
Aggiungere menù a tendina da lista variabile Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 17 |
Menu a tendina che non mi seleziona una provincia Autore: danibi60 |
Forum: Applicazioni Office Windows Risposte: 6 |
menu a tendina con filtro per selezione elenco Autore: marcus69 |
Forum: Applicazioni Office Windows Risposte: 13 |
Visitano il forum: Nessuno e 35 ospiti