Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default vba function ( populating rows)

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



  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default vba function ( populating rows)

Thank you very much, It works very well.


"JMB" wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default vba function ( populating rows)

Quite welcome.

"Bre-x" wrote:

Thank you very much, It works very well.


"JMB" wrote in message
...
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







Reply
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
Populating a subset Will Excel Worksheet Functions 0 November 29th 06 02:09 PM
Populating one worksheet from another Whitman Excel Worksheet Functions 0 July 24th 06 09:33 PM
Conditions & Populating Christy Excel Worksheet Functions 8 March 17th 06 06:49 PM
Populating another tab. Brian Excel Discussion (Misc queries) 1 June 24th 05 12:29 AM
flexible paste rows function that inserts the right number of rows marika1981 Excel Discussion (Misc queries) 1 February 18th 05 02:40 AM


All times are GMT +1. The time now is 07:19 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"