Moderatori: Anthony47, Flash30005
Sub EvidenziaNumEstratti()
Worksheets("AnalisiLotto").Range("M2:R12").Interior.ColorIndex = xlNone
UV = Range("U" & Rows.Count).End(xlUp).Row
Worksheets("AnalisiLotto").Range("Y2:AD" & UV).Interior.ColorIndex = xlNone
Dim VettE(5) As Integer
For RiE = 2 To 12
Ruota = Worksheets("AnalisiLotto").Range("M" & RiE).Value
For VE = 1 To 5
VettE(VE) = Worksheets("AnalisiLotto").Cells(RiE, 13 + VE).Value
Next VE
For RiS = 2 To UV
If Ruota = Worksheets("AnalisiLotto").Range("U" & RiS).Value Then
For CosN = 25 To 30
VS = Worksheets("AnalisiLotto").Cells(RiS, CosN).Value
For VE = 1 To 5
If VS = VettE(VE) Then
Cells(RiE, 13 + VE).Interior.ColorIndex = 3
Cells(RiS, CosN).Interior.ColorIndex = 3
End If
Next VE
Next CosN
End If
Next RiS
Next RiE
End Sub
If VS = VettE(VE) Then
Cells(RiE, 13 + VE).Interior.ColorIndex = 3
Cells(RiS, CosN).Interior.ColorIndex = 3
Cells(RiS, 21).Interior.ColorIndex = 3 '<<<<<<<<< da aggiungere
End If
esci: '<<<< esistente
End With '<<<< esistente
Next Vs1 '<<<< esistente
Call Evidenzia '<<<< esistente
Call EvidenziaNumEstratti '<<<<< aggiungere chiamata routine
End Sub '<<<< esistente Fine routine CompilaTab
Sub EvidenziaNumEstratti()
Worksheets("AnalisiLotto").Range("M2:R12").Interior.ColorIndex = xlNone '<<<< lascia qui questo codice
UV = Range("U" & Rows.Count).End(xlUp).Row '<<<< lascia qui questo codice
Worksheets("AnalisiLotto").Range("Y2:AD" & UV).Interior.ColorIndex = xlNone '<<<< sposta questo codice (con taglia e incolla come spiegherò al passo successivo
Dim VettE(5) As Integer '<<<< lascia qui questo codice
Sub CompilaTab()
Num = 0 '<<<<<<<<< esistente
Dim VettN(90) As Integer '<<<<<<<<< esistente
Dim VettRA(90) As String '<<<<<<<<< esistente
UE = Range("U" & Rows.Count).End(xlUp).Row '<<<<<<<<< esistente
Worksheets("AnalisiLotto").Range("U2:X" & UE).Clear '<<<<<<<<< esistente
Worksheets("AnalisiLotto").Range("Y2:AD" & UV).Interior.ColorIndex = xlNone '<<<<<<<<< incolla in questo punto quella riga ma vedi nota (*)
For Vs1 = 1 To 90 '<<<<<<<<< esistente
...
Worksheets("AnalisiLotto").Range("Y2:AD" & UE).Interior.ColorIndex = xlNone
Sub CopiaAna()
CS1 = ""
CS2 = ""
UE = Worksheets("AnalisiLotto").Range("U" & Rows.Count).End(xlUp).Row
UC = Worksheets("Confronto").Range("IV2").End(xlToLeft).Column
If UC > 1 Then UC = UC + 2
For CC = 21 To 30
CS1 = CS1 & Worksheets("AnalisiLotto").Cells(2, CC)
Next CC
For CC = UC - 9 To UC
CS2 = CS2 & Worksheets("Confronto").Cells(1, CC)
Next CC
If CS1 <> CS2 Then
Worksheets("AnalisiLotto").Range("U2:AD" & UE).Copy
Sheets("Confronto").Select
Cells(1, UC).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range(Columns(UC), Columns(UC + 10)).EntireColumn.AutoFit
Range("K1").Select
Worksheets("AnalisiLotto").Select
Range("T2").Select
Application.CutCopyMode = False
End If
End Sub
Sub CopiaAna()
CS1 = ""
CS2 = ""
UE = Worksheets("AnalisiLotto").Range("U" & Rows.Count).End(xlUp).Row
UC = Worksheets("Confronto").Range("IV2").End(xlToLeft).Column
If UC > 1 Then UC = UC + 2
For CC = 21 To 30
CS1 = CS1 & Worksheets("AnalisiLotto").Cells(2, CC)
Next CC
If UC = 1 Then
CS2 = ""
Else
For CC = UC - 9 To UC
CS2 = CS2 & Worksheets("Confronto").Cells(1, CC - 2)
Next CC
End If
If CS1 <> CS2 Then
Worksheets("AnalisiLotto").Range("U2:AD" & UE).Copy
Sheets("Confronto").Select
Cells(1, UC).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range(Columns(UC), Columns(UC + 10)).EntireColumn.AutoFit
Range("K1").Select
Worksheets("AnalisiLotto").Select
Range("T2").Select
Application.CutCopyMode = False
End If
End Sub
Torna a Applicazioni Office Windows
Automatizzare numero settimane nel mese di un anno Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 3 |
è possibile collegare un altro pc al notebook? Autore: nonsonoio |
Forum: Assistenza Hardware Risposte: 2 |
E' possibile collegare un cellulare ad un monitor? Autore: nippon |
Forum: Software Windows Risposte: 2 |
È possibile passare uno script da vba a app per smartphone? Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 6 |
Visitano il forum: Nessuno e 33 ospiti