Grazie infinite Anthony,
ma giusto per capire meglio , in quale posizione c'era lo spazio che inquinava l'esecuzione corretta della macro?
Un caro saluto,
Danibi
Moderatori: Anthony47, Flash30005
Sub DayRIEP2()
'Vedi http://www.pc-facile.com/forum/viewtopic.php?f=26&t=109392&p=645418#p645418
Dim cSh As Worksheet, rSh As Worksheet, tSped As String, cSped As String
Dim myNext As Long, cVal As Single, speDat As Date
'
'Scelta della filiale; vuoto = Tutte le filiali:
tSped = Application.InputBox("Numero della filiale? (vuoto per TUTTE)", "Quale filiale?", , , , , , 2)
If Right(" " & tSped, 1) <> "-" And Len(tSped) > 0 Then tSped = tSped & "-"
'
Set cSh = ActiveSheet
Sheets.Add after:=cSh
Set rSh = ActiveSheet
rSh.Range("A1:C1") = Array("Spedizione", "Data", "Valore")
cSh.Select
'
For I = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If Left(Cells(I, 1), Len(tSped)) = tSped Then
cSped = Cells(I, 1)
If Cells(I, "D").Value <> "" Then speDat = Cells(I, "D").Value
If cSped = Cells(I + 1, 1) Then
cVal = cVal + Cells(I, "Q") + Cells(I, "V") + Cells(I, "W") + Cells(I, "X") + Cells(I, "Y")
Else
cVal = cVal + Cells(I, "Q") + Cells(I, "V") + Cells(I, "W") + Cells(I, "X") + Cells(I, "Y")
myNext = rSh.Cells(Rows.Count, 1).End(xlUp).Row + 1
rSh.Cells(myNext, 1) = cSped
rSh.Cells(myNext, 2) = speDat
rSh.Cells(myNext, 3) = cVal
cVal = 0
End If
End If
Next I
Dim filMsg As String
If tSped = "" Then filMsg = "TUTTE" Else filMsg = tSped
MsgBox ("Completato; filiale: " & filMsg)
End Sub
=CERCA.VERT(A2;'Competenze Passive'!B:AJ;35;0)
=SE.ERRORE(--(ASS(D2-B2)>0,001);100)
sembra che sia riuscito, grazie sopratutto alle tue precise indicazioni, nel creare quanto detto e che il risultato sia effettivamente esatto
=SE(F2=1;D2-B2;"")
=SOMMA.SE(D2:D800;"<>#N/D")
=AGGREGA(9;6;D2:D800)
Torna a Applicazioni Office Windows
"Spegnere" il riconoscimento data. Autore: aggittoriu |
Forum: Applicazioni Office Windows Risposte: 2 |
Totale valori di più colonne del foglio con funzione Sum Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 6 |
Visitano il forum: Nessuno e 52 ospiti