alfrimpa, 23/03/2016 21.48:Ciao Tiziano Quello che chiedi non è possibile farlo con semplici formule ma occorre una macro. Non mi è chiaro il tuo scenario; allega un file di esempio con il risultato desiderato.
alfrimpa, 23/03/2016 23.32:Tiziano volevo dirti che non è corretto inviare la medesima richiesta contemporaneamente su più forum; tu lo hai fatto su Forumexcel.it dove il crossposting (così si chiama tale pratica) è vietato dal loro Regolamento. Questo per una questione di rispetto verso chi si impegna per un tuo problema e si accinge a risponderti.
Private Sub Worksheet_Change(ByVal Target As Range) Dim erow As Long Dim ws As Worksheet Dim lastrow As Long Dim count As Integer If Not Intersect(Target, Range("b3")) Is Nothing Then lastrow = Sheets("dati").Cells(Rows.count, 1).End(xlUp).Row For x = 2 To lastrow If Sheets("dati").Cells(x, 1) = Foglio2.Range("B3") Then Foglio2.Range("A11") = Sheets("dati").Cells(x, 1) Foglio2.Range("B11") = Sheets("dati").Cells(x, 2) Foglio2.Range("C11") = Sheets("dati").Cells(x, 3) Foglio2.Range("D11") = Sheets("dati").Cells(x, 4) Foglio2.Range("E11") = Sheets("dati").Cells(x, 5) Foglio2.Range("F11") = Sheets("dati").Cells(x, 6) Foglio2.Range("G11") = Sheets("dati").Cells(x, 7) Foglio2.Range("A14") = Sheets("dati").Cells(x, 8) Foglio2.Range("B14") = Sheets("dati").Cells(x, 9) Foglio2.Range("C14") = Sheets("dati").Cells(x, 10) Foglio2.Range("D14") = Sheets("dati").Cells(x, 11) Foglio2.Range("E14") = Sheets("dati").Cells(x, 12) Foglio2.Range("F14") = Sheets("dati").Cells(x, 13) Foglio2.Range("G14") = Sheets("dati").Cells(x, 14) count = count + 1 End If Next x Worksheets("maschera").Range("A11:G11").Font.ColorIndex = TrovaColore Worksheets("maschera").Range("A14:G14").Font.ColorIndex = TrovaColore End If End Sub
Function TrovaColore() Dim ur As Long Dim rng As Range Dim cel As Range Application.Volatile ur = Worksheets("dati").Cells(Rows.count, 1).End(xlUp).Row Set rng = Worksheets("dati").Range("a1:a" & ur) For Each cel In rng If cel.Value = Worksheets("maschera").Range("b3").Value Then TrovaColore = cel.Font.ColorIndex End If Next cel End Function
alfrimpa, 25/03/2016 19.14:Beh con tutto questo background (retroscena) penso che non avrai molti problemi ad imparare il VBA; peccato che ti manchi l'inglese che, in ambito VBA, può essere d'aiuto. Se ne hai voglia posso consigliarti siti o, ancora meglio, libri sui quali cominciare a studiare. Sarò vecchio ma ritengo che, oltre alla frequentazione di Internet, un buon testo sia la maniera migliore per imparare il VBA (o qualsiasi altra cosa).