LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
AND AND is offline
external usenet poster
 
Posts: 22
Default MSG BROUPED BY GROUP

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?



--
BBB
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range.Group Method - group rows, not columns serhio[_2_] Excel Programming 1 May 7th 08 01:26 PM
Copy Data from One Group of Cells to Another Group Alan Auerbach Charts and Charting in Excel 2 May 27th 07 04:12 PM
Group a range - closing the group does not hide the controls.... [email protected] Excel Programming 0 April 21st 07 04:53 AM
Taking age group Ie ages 20-29 and picking out net sales for group viabello Excel Worksheet Functions 1 April 25th 06 04:19 AM
How do I group worksheets (Lotus 123 function is "Sheet>Group Shee jaking Excel Worksheet Functions 2 August 30th 05 02:09 PM


All times are GMT +1. The time now is 11:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"