Moderatori: Anthony47, Flash30005
Private Sub Workbook_Open()
UR = Worksheets("Foglio1").Range("A" & Rows.Count).End(xlUp).Row
Dim Ws1 As Worksheet
Set Ws1 = Worksheets("Foglio1")
Ws1.Range("A2:F" & UR).Interior.ColorIndex = xlNone
Ws1.Range("A2:F" & UR).Font.ColorIndex = 0
For RR = 2 To UR
If Ws1.Cells(RR, 7).Value <> "" Then Ws1.Range(Ws1.Cells(RR, 1), Ws1.Cells(RR, 6)).Interior.ColorIndex = 6
If Ws1.Cells(RR, 8).Value <> "" Then Ws1.Range(Ws1.Cells(RR, 1), Ws1.Cells(RR, 6)).Interior.ColorIndex = 4
If Ws1.Cells(RR, 9).Value <> "" Then Ws1.Range(Ws1.Cells(RR, 1), Ws1.Cells(RR, 6)).Interior.ColorIndex = 38
If Ws1.Cells(RR, 10).Value <> "" Then Ws1.Range(Ws1.Cells(RR, 1), Ws1.Cells(RR, 6)).Interior.ColorIndex = 3
If Ws1.Cells(RR, 10).Value <> "" Then Ws1.Range(Ws1.Cells(RR, 1), Ws1.Cells(RR, 6)).Font.ColorIndex = 2
Next RR
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
UR = Range("A" & Rows.Count).End(xlUp).Row
CheckArea = "G2:J" & UR
If Not Application.Intersect(ActiveCell, Range(CheckArea)) Is Nothing Then
If (Selection.Rows.Count + Selection.Columns.Count) > 2 Then Exit Sub
Application.EnableEvents = False
RR = Selection.Row
Range(Cells(RR, 7), Cells(RR, 10)).ClearContents
Range(Cells(RR, 7), Cells(RR, 10)).Font.Name = "Webdings"
Selection.Value = "a"
Range("B" & RR).Value = Date
Range(Cells(RR, 1), Cells(RR, 6)).Font.ColorIndex = 0
If Cells(RR, 7).Value <> "" Then Range(Cells(RR, 1), Cells(RR, 6)).Interior.ColorIndex = 6
If Cells(RR, 8).Value <> "" Then Range(Cells(RR, 1), Cells(RR, 6)).Interior.ColorIndex = 4
If Cells(RR, 9).Value <> "" Then Range(Cells(RR, 1), Cells(RR, 6)).Interior.ColorIndex = 38
If Cells(RR, 10).Value <> "" Then Range(Cells(RR, 1), Cells(RR, 6)).Interior.ColorIndex = 3
If Cells(RR, 10).Value <> "" Then Range(Cells(RR, 1), Cells(RR, 6)).Font.ColorIndex = 2
End If
Application.EnableEvents = True
End SubTorna a Applicazioni Office Windows
| Confronto valori celle uguali su due colonne Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 9 |
| copia celle adiacenti da tre fogli Autore: Gianca532011 |
Forum: Applicazioni Office Windows Risposte: 10 |
| Conta le celle colorate / migliore peggiore Autore: raimea |
Forum: Applicazioni Office Windows Risposte: 8 |
| Inserimento parziale valore cella in MessageBox Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 6 |
Visitano il forum: Nessuno e 187 ospiti