A
AND
HELLO,
In SHEET3 I have this table beginning from B column:
DES_CC COD NAME TIME1 TIME2 TIME3 DELTA
Exp A 10025 PIP 12,00 12,10 12,00 0
Exp A 10026 LIL 12,00 13,74 14,00 2
Exp B 10027 TOP 10,00 9,03 9,00 -1
Exp B 10028 PAPERIN 15,00 7,49 7,00 -8
Exp B 10029 GEP 10,00 9,36 9,00 -1
Exp B 10030 Z 5,00 4,71 5,00 0
Exp B 10031 MIN 10,00 10,10 10,00 0
Exp C 10032 PLUT 5,00 4,50 5,00 0
Exp C 10033 ZOR 5,00 4,51 5,00 0
Exp C 10034 TOR 4,00 2,71 3,00 -1
Exp C 10035 ORES 5,00 4,51 5,00 0
I've developed this script to get a msgbox for each DELTA different from 0.
Instead I need of a msgboxthat list all the DELTAs in a unique "BOX" for
each different "DES_CC". Here my script, different from that I want:
Private Sub CommandButton1_Click()
Dim i, y, lavorato As Long
Dim ws As Worksheet
Set ws = Worksheets("Foglio3")
With ws
For i = 2 To 61
For y = 5 To 8
If ws.Cells(i, y).Value < ws.Cells(i, y + 1).Value Then
lavorato = ws.Cells(i, y + 2).Value - ws.Cells(i, y).Value
MsgBox (ws.Cells(i, 4).Value & " di " & ws.Cells(i, 2).Value & " Ha fatto
straordinari/ferie di" _
& lavorato & " ore in più di quanto pianificato nella week " _
& ws.Cells(1, y))
End If
Next
Next
End With
Set ws = Nothing
End Sub
Here the result I'm looking for:
for example in the first msgbox I wanna see in:
"the following employes of EXP A office got these discrepancies:"
LIL 12,00 13,74 14,00 2
in the second msgbox:
"the following employes of EXP B office got these discrepancies:"
TOP -1
PAPERIN -8
GEP -1
Z 0
MIN 0
Please help me...
Can you help me please?
In SHEET3 I have this table beginning from B column:
DES_CC COD NAME TIME1 TIME2 TIME3 DELTA
Exp A 10025 PIP 12,00 12,10 12,00 0
Exp A 10026 LIL 12,00 13,74 14,00 2
Exp B 10027 TOP 10,00 9,03 9,00 -1
Exp B 10028 PAPERIN 15,00 7,49 7,00 -8
Exp B 10029 GEP 10,00 9,36 9,00 -1
Exp B 10030 Z 5,00 4,71 5,00 0
Exp B 10031 MIN 10,00 10,10 10,00 0
Exp C 10032 PLUT 5,00 4,50 5,00 0
Exp C 10033 ZOR 5,00 4,51 5,00 0
Exp C 10034 TOR 4,00 2,71 3,00 -1
Exp C 10035 ORES 5,00 4,51 5,00 0
I've developed this script to get a msgbox for each DELTA different from 0.
Instead I need of a msgboxthat list all the DELTAs in a unique "BOX" for
each different "DES_CC". Here my script, different from that I want:
Private Sub CommandButton1_Click()
Dim i, y, lavorato As Long
Dim ws As Worksheet
Set ws = Worksheets("Foglio3")
With ws
For i = 2 To 61
For y = 5 To 8
If ws.Cells(i, y).Value < ws.Cells(i, y + 1).Value Then
lavorato = ws.Cells(i, y + 2).Value - ws.Cells(i, y).Value
MsgBox (ws.Cells(i, 4).Value & " di " & ws.Cells(i, 2).Value & " Ha fatto
straordinari/ferie di" _
& lavorato & " ore in più di quanto pianificato nella week " _
& ws.Cells(1, y))
End If
Next
Next
End With
Set ws = Nothing
End Sub
Here the result I'm looking for:
for example in the first msgbox I wanna see in:
"the following employes of EXP A office got these discrepancies:"
LIL 12,00 13,74 14,00 2
in the second msgbox:
"the following employes of EXP B office got these discrepancies:"
TOP -1
PAPERIN -8
GEP -1
Z 0
MIN 0
Please help me...
Can you help me please?