
Selection.Find(What:="data prossima", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveSheet.Range("$A$1:$AK$5823").AutoFilter Field:=25, Criteria1:=xlFilterNextWeek, Operator:=xlFilterDynamic |
Function TrovaColonna(Tabella_Dati As Range, Colonna As Variant) As Variant
If Colonna = "" Then
TrovaColonna = ""
Exit Function
End If
TrovaColonna = Tabella_Dati.Find(Colonna, LookAt:=xlWhole).Column
End Function
|
Da così
ActiveSheet.Range("$A$1:$F$529").AutoFilter Field:=6, Criteria1:="3"
a così
ActiveSheet.Range("$A$1:$F$529").AutoFilter Field:=variabile, Criteria1:="3" |
=VALORE(CERCA.VERT(STRINGA.ESTRAI(INDIRIZZO(1;CONFRONTA("data prossima proposta";A1:AK1;0));2;1);TabellaColonne;2;FALSO))
Dim campo as Integer
campo = Range("AZ1").Value
ActiveSheet.Range("$A$1:$AK$5843").AutoFilter Field:=campo, Criteria1:="3" |
Sub Filtra()
Cells.Find(What:="data prossima proposta", After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext _
, MatchCase:=False).Activate
Dim campo As Integer
campo = ActiveCell.Column - ActiveCell.End(xlToLeft).Column + 1
ActiveCell.AutoFilter Field:=campo, Criteria1:=xlFilterNextWeek, Operator:=xlFilterDynamic
End Sub |
