Il file l'ho già inviato, guarda il post delle 21,54 ma dev'esserti sfuggito.
Comunque questo è il link.
https://dl.dropbox.com/u/18220462/FILE/SPIA%20TT%20.zip
Moderatori: Anthony47, Flash30005
Sub TrRit()
UR = Worksheets("SpiaTT").Range("A" & Rows.Count).End(xlUp).Row
Worksheets("SpiaTT").Columns(5).ClearContents
Worksheets("SpiaTT").[E1].Value = "Rit."
Tr = 0
For RR1 = 2 To UR
If Worksheets("SpiaTT").Range("B" & RR1).Value = "Spia" And Tr = 0 Then
Conc1 = Worksheets("SpiaTT").Range("A" & RR1).Value
For RR2 = RR1 + 1 To UR
If Worksheets("SpiaTT").Range("B" & RR2).Value = "" Then
Tr = 0
Worksheets("SpiaTT").Range("E" & RR2).Value = Worksheets("SpiaTT").Range("A" & RR2).Value - Conc1
RR1 = RR2
GoTo SaltaRR2
End If
Next RR2
Tr = 1
SaltaRR2:
End If
Next RR1
End Sub
Sub TrRit2()
For F = 1 To Worksheets.Count
UR = Worksheets(F).Range("A" & Rows.Count).End(xlUp).Row
Worksheets(F).Columns(5).ClearContents
Worksheets(F).[E1].Value = "Rit."
Tr = 0
For RR1 = 2 To UR
If Worksheets(F).Range("A" & RR1).Value <> "" Then
If Worksheets(F).Range("B" & RR1).Value = "Spia" And Tr = 0 Then
Conc1 = Worksheets(F).Range("A" & RR1).Value
For RR2 = RR1 + 1 To UR
If Worksheets(F).Range("B" & RR2).Value = "" Then
Tr = 0
If Worksheets(F).Range("A" & RR2).Value <> "" Then Worksheets(F).Range("E" & RR2).Value = Worksheets(F).Range("A" & RR2).Value - Conc1
RR1 = RR2
GoTo SaltaRR2
End If
Next RR2
Tr = 1
SaltaRR2:
End If
Else
Tr = 0
End If
Next RR1
Next F
End Sub
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: 5 |
Problema con macro copia e rinomina file Autore: systemcrack |
Forum: Applicazioni Office Windows Risposte: 2 |
formula excel non visualizza risultato Autore: tommasog |
Forum: Applicazioni Office Windows Risposte: 6 |
Macro che ricerca combinazioni che danno un valore Autore: kar64 |
Forum: Applicazioni Office Windows Risposte: 10 |
Visitano il forum: Ricky0185 e 46 ospiti