vba function ( populating rows)
Assuming total hours (10) appears in C2, Hours/Day is in D2, try this in E2
and copy across and down as far as needed.
=MEDIAN(0,$D2,$C2-((COLUMNS($E2:E2)-1)*$D2))
I'm assuming, for the first item, you want 3 days with 3 hours and one day
with 1 hour (so you don't exceed the total hours), and then 0 hours after the
total has been reached.
"Bre-x" wrote:
Hi,
I would like to create a Function (VBA) that will go to each row take the
TOTALHOURS and acording to
the HOURS/DAY value will enter on each column (DAY) the HOURS/DAY value
until it equeals that value
Example:
WC TOTALHOURS HOURD/DAY 07/02/07 07/03//07 07/04/07
07/05/2007
ABC 10 3 3
3 3 3
ZYS 5 3 3
2
123 10 2 2
2 2 2
Do you think it can be done?
I am trying to create my own Shop Scheduler.
Regards,
Bre-x
|