Moderatori: Anthony47, Flash30005
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set CheckArea = Application.Union(Range("J2:J2000"), Range("L2:L2000"))
If Application.Intersect(ActiveCell, CheckArea) Is Nothing Then Exit Sub
If (Selection.Rows.Count + Selection.Columns.Count) > 2 Then Exit Sub
Sheets("LIST_FOR").Range("H1").Value = Cells(Target.Row, 2).Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
RR = Foglio2.Range("E" & Rows.Count).End(xlUp).Row
Foglio2.Range("E2:E" & RR).ClearContents
RR = Foglio2.Range("A" & Rows.Count).End(xlUp).Row
J = 2
For I = 2 To RR
If Foglio2.Cells(I, 1) = Foglio1.Cells(Target.Row, 1) Then
Foglio2.Cells(J, 5) = Foglio2.Cells(I, 2)
J = J + 1
End If
Next I
If Target.Column = 1 Then
Foglio1.Cells(Target.Row, 10) = ""
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
RR = Foglio2.Range("E" & Rows.Count).End(xlUp).Row
Foglio2.Range("E2:E" & RR).ClearContents
RR = Foglio2.Range("A" & Rows.Count).End(xlUp).Row
J = 2
For I = 2 To RR
If Foglio2.Cells(I, 1) = Foglio1.Cells(Target.Row, 2) Then
Foglio2.Cells(J, 5) = Foglio2.Cells(I, 2)
J = J + 1
End If
Next I
If Target.Column = 2 Then
Foglio1.Cells(Target.Row, 10) = ""
End If
End Sub
Non vedo nel tuo file dove e' l' anagrafica con l' elenco completo di Fornitore /Prodotto /Prezzo; la cosa piu' vicina a quello che dico e' il foglio LIST_FORe quindi supponiamo che sia quello.
=PICCOLO(SE(LIST_FOR!$A$1:$A$1000=$H$1;RIF.RIGA(LIST_FOR!$A$1:$A$1000);"");RIGHE($A$2:A2))
=SE(VAL.ERRORE(J2);"";INDICE(LIST_FOR!B$1:B$1000;$J2))
=SE(VAL.ERRORE(CONFRONTA(B2&J2;(LIST_FOR!A$2:A$13)&(LIST_FOR!B$2:B$13);0));"";INDICE(LIST_FOR!C$2:C$5000;CONFRONTA(B2&J2;(LIST_FOR!A$2:A$13)&(LIST_FOR!B$2:B$13);0)))
Private Sub Worksheet_Change(ByVal Target As Range)
CheckArea = "B2:B2000" '<<< L' area usata di Documenti / Col B
If Application.Intersect(Target, Range(CheckArea)) Is Nothing Then Exit Sub
Cells(Target.Row, 10).ClearContents
End Sub
CheckArea = "B1:B2000"
If Not Application.Intersect(ActiveCell, Range(CheckArea)) Is Nothing Then
If (Selection.Rows.Count + Selection.Columns.Count) > 2 Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlManual
Application.EnableEvents = False
RArt = Target.Row
ArtV = UCase(Target.Value)
If ArtV <> 0 Then
UR = Worksheets("ANA").Range("C" & Rows.Count).End(xlUp).Row
For R = 2 To UR
If ArtV = Mid(Worksheets("ANA").Range("C" & R).Value, 1, Len(ArtV)) Then
Target.Value = Worksheets("ANA").Range("C" & R).Value
GoTo esci
End If
Next R
esci:
End If
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set CheckArea = Application.Union(Range("J2:J2000"), Range("L2:L2000"))
If Application.Intersect(ActiveCell, CheckArea) Is Nothing Then Goto Seconda '< >< >
If (Selection.Rows.Count + Selection.Columns.Count) > 2 Then Exit Sub
Sheets("LIST_FOR").Range("H1").Value = Cells(Target.Row, 2).Value
Seconda: '< >< >
'SEGUE LA SECONDA MACRO '< >< >
CheckArea = "B1:B2000"
If Not Application.Intersect(ActiveCell, Range(CheckArea)) Is Nothing Then
'etc etc
'etc
End Sub
Non so "prima" che convalida avevi, ora dovresti avere in testa all' elenco K1:K1000 le sole voci che appartengono al Fornitore prescelto seguito da celle vuote.Con riferimento alla seconda domanda, il risultato ottenuto con la formula che mi hai proposto e la convalida che avevo prima è sempre lo stesso, in quanto l'intervallo K1:K1000 rimane sempre uguale. Il problema è che . . .(etc etc)
=SCARTO(LIST_FOR!$K$1;0;0;SOMMA(--(LUNGHEZZA(LIST_FOR!$K$1:$K$100)>0));1)
Torna a Applicazioni Office Windows
Scelta da elenco a discesa che ne apre un altro Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 12 |
Trasferimento dati tra due fogli con due condizioni Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 9 |
menu a tendina con filtro per selezione elenco Autore: marcus69 |
Forum: Applicazioni Office Windows Risposte: 13 |
Creare un elenco numerato di titoli in excel come in word Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 8 |
definizione automatica di nomi da un elenco Autore: marcoc |
Forum: Applicazioni Office Windows Risposte: 4 |
Visitano il forum: Nessuno e 16 ospiti