Ciao a tutti ,
volevo chiedervi se c'è una formula che se trova in un Range ,
esempio E5:N200 una cella colorata da una macro,mi cancelli i dati del Range E5:N200
prima
url=http://w[ww.postimage.org/][/url]
e dopo
Moderatori: Anthony47, Flash30005
Sub trova_colore()
Dim a As Single
'Bari
For Each cella In Range("F6:O205")
If cella.Interior.ColorIndex = 3 Then
a = a + 1
End If
Next
Range("F2") = a
If Range("F2").Value = 1 Then
Range("F6:O205").Value = ""
End If
End Sub
Sub trova_colore()
Dim a As Single
'Bari
For Each cella In Range("F6:O205")
If cella.Interior.ColorIndex = 3 Then
a = a + 1
End If
Next
Range("F2") = a
If Range("F2").Value = 1 Then
Range("F6:O205").Value = ""
Range("F2").Value = ""
End If
'Cagliari
For Each cella In Range("P6:Y205")
If cella.Interior.ColorIndex = 3 Then
a = a + 1
End If
Next
Range("P2") = a
If Range("F2").Value = 1 Then
Range("P6:Y205").Value = ""
End If
'Firenze
For Each cella In Range("Z6:AI205")
If cella.Interior.ColorIndex = 3 Then
a = a + 1
End If
Next
Range("Z2") = a
If Range("F2").Value = 1 Then
Range("Z6:AI205").Value = ""
End If
'Genova
For Each cella In Range("AJ6:AS205")
If cella.Interior.ColorIndex = 3 Then
a = a + 1
End If
Next
Range("AJ2") = a
If Range("F2").Value = 1 Then
Range("AJ6:AS205").Value = ""
End If
Sub trova_colore()
Dim a As Single
'Bari
For I=0 to 4 '4 ne ho contati nel tuo esempio
For Each cella In Range("F6").offset(0,I*10).range("A1:J200")
If cella.Interior.ColorIndex = 3 Then
'. . .
'. . .
'. . .
Next cella
Next I
Torna a Applicazioni Office Windows
Excel: formula automatica per evidenziare prodotto scaduto Autore: gamma_ray |
Forum: Applicazioni Office Windows Risposte: 3 |
Salvare file excel in formato html escludendo le immagini Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 6 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Excel 2016 - Funzione SCARTO + INDIRETTO Autore: pl1957 |
Forum: Applicazioni Office Windows Risposte: 2 |
Visitano il forum: Marius44 e 43 ospiti