Monday, April 28, 2014

Use first row of table to determine calculation of rest of the rows of that table.

I have time sheet table where the rows are employees names and the column is the dates in the calender






















































Name



01



02



03



04



05



06



07



08



09



Emp 1



8



8



8



8



8



0



0



8



8



Emp 2



8



7



8



9



8



0



0



8



7



Emp 3



6



8



8



8



8



0



0



8



8



I want to come up with this table - where '1' indicates the public holiday.


































































Name



01



02



03



04



05



06



07



08



09



1



Emp 1



8



8



8



16



8



0



0



8



8



Emp 2



8



7



8



18



8



0



0



8



7



Emp 3



6



8



8



16



8



0



0



8



8



** I have the public Holiday table with dates of public holidays. I can do UNION ALL with sheet table and Public Holiday table to get the first row. i.e. if there is a Public Holiday within that date range then it will have '1' in the corresponding field of the first row.


** Now If the there is a '1' in a field of the first row, I want all values below it to be doubled as shown in the example.


Please point me in the right direction.




Marsh Narewec



No comments:

Post a Comment