Hi,

I dont know if the topic represents the real thing I want, so here is an explanation...I have these entries in my worksheet:

[TABLE="border: 1, cellpadding: 1, width: 500"]

Shift table

[/td]M

[/td]Tu

[/td]W

[/td]Th

[/td]F

[/td]Sa

[/td]Su

[/td]M

[/td]Tu

[/td]W

[/td]Th

[/td]F

[/td]Sa

[/td]Su

[/td]M

[/td]Tu

[/td]W

[/td]Th

[/td]F

[/td]Sa

[/td]Su

[/td]M

[/td]Tu

[/td]W

[/td]Th

[/td]F

[/td]Sa

[/td]Su

[/td]M

[/td]Tu

[/td]W

[/td]Consecutive days of Illness form previous month

[/td]1

[/td]2

[/td]3

[/td]4

[/td]5

[/td]6

[/td]7

[/td]8

[/td]9

[/td]10

[/td]11

[/td]12

[/td]13

[/td]14

[/td]15

[/td]16

[/td]17

[/td]18

[/td]19

[/td]20

[/td]21

[/td]22

[/td]23

[/td]24

[/td]25

[/td]26

[/td]27

[/td]28

[/td]29

[/td]30

[/td]31

[/td]25

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]1

[/td]2

[/td]x

[/td]x

[/td]1

[/td]2

[/td]x

[/td]x

[/td]1

[/td]2

[/td]x

[/td]x

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]IL

[/td]1

[/td]2

[/td]x

[/td]x

[/td]1

[/td]

[/TABLE]

This is a shift table from one employee... ,The upper rows are the days of the month, and down is the row that represents the shifts. Among the regular shifts the employee might be absent because of an illness. The first column represents the days of illness from the previous month (manually entered, if he had any). and with IL are presented the days of illness for the current month. What I want to do in the following table: [TABLE="border: 1, cellpadding: 1, width: 500"]

<=7

[/td]40 (expected value from the shift table)

[/td]8-30

[/td]0

[SIZE=13px](expected value from the shift table)[/SIZE]

31>=

[/td]48

[SIZE=13px](expected value from the shift table)[/SIZE]

[/TABLE]

Is to count the different periods of illness. check if every of them are less then 7, between 8 and 30 or 31+ consecutive days, multiply by 8 (as a regular working day) and place them into the right column respectively. When multiplying as a regular working days it should count and multiply only if it is a workday, but not weekends (Saturday and Sunday). This is necessary because different period of illness is paid differently (from the company, from the health insurance etc.)

I tried to do something by using Frequency function, but I stuck, searched thru internet for a solution, and could find any,,,,

Hope someone has it....

Thanks in advance

Regards

Aleksandar