Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sum or subtotal at a specified amount


This is my first time using this forum...

I am trying to make a schedule that uses the dollar amounts of various
jobs to schedule a certain amount of work in a week. For example if I
have a hundred jobs that are worth various amounts of money each, and I
know that I can do $5,000.00 of work in a week - I want the spreadsheet
to break the work into consecutive week segments so I can schedule the
proper amount of work in each week and it will do it automatically even
if I shuffle the jobs around.

Any idea how I can do this?


--
ChrisV
------------------------------------------------------------------------
ChrisV's Profile: http://www.excelforum.com/member.php...o&userid=36346
View this thread: http://www.excelforum.com/showthread...hreadid=561298

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Sum or subtotal at a specified amount

I just noticed that

If weeksum weekbreak Then GoTo newweek

should be

If weeksum = weekbreak Then GoTo newweek

"duane" wrote:

how about this macro

Sub weekwork()
Sheets("sheet2").Select
' i set this to insert a row when total is 7 or greater
weekbreak = 7
' data starts in row 3
i = 2
start:
weeksum = 0
sameweek:
i = i + 1
' data in column 4
If Cells(i, 4).Value = 0 Then GoTo theend
weeksum = weeksum + Cells(i, 4).Value
If weeksum weekbreak Then GoTo newweek
GoTo sameweek
newweek:
Cells(i + 1, 4).Select
Selection.EntireRow.Insert
i = i + 1
GoTo start
theend:
End Sub

"ChrisV" wrote:


This is my first time using this forum...

I am trying to make a schedule that uses the dollar amounts of various
jobs to schedule a certain amount of work in a week. For example if I
have a hundred jobs that are worth various amounts of money each, and I
know that I can do $5,000.00 of work in a week - I want the spreadsheet
to break the work into consecutive week segments so I can schedule the
proper amount of work in each week and it will do it automatically even
if I shuffle the jobs around.

Any idea how I can do this?


--
ChrisV
------------------------------------------------------------------------
ChrisV's Profile: http://www.excelforum.com/member.php...o&userid=36346
View this thread: http://www.excelforum.com/showthread...hreadid=561298


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Sum or subtotal at a specified amount

how about this macro

Sub weekwork()
Sheets("sheet2").Select
' i set this to insert a row when total is 7 or greater
weekbreak = 7
' data starts in row 3
i = 2
start:
weeksum = 0
sameweek:
i = i + 1
' data in column 4
If Cells(i, 4).Value = 0 Then GoTo theend
weeksum = weeksum + Cells(i, 4).Value
If weeksum weekbreak Then GoTo newweek
GoTo sameweek
newweek:
Cells(i + 1, 4).Select
Selection.EntireRow.Insert
i = i + 1
GoTo start
theend:
End Sub

"ChrisV" wrote:


This is my first time using this forum...

I am trying to make a schedule that uses the dollar amounts of various
jobs to schedule a certain amount of work in a week. For example if I
have a hundred jobs that are worth various amounts of money each, and I
know that I can do $5,000.00 of work in a week - I want the spreadsheet
to break the work into consecutive week segments so I can schedule the
proper amount of work in each week and it will do it automatically even
if I shuffle the jobs around.

Any idea how I can do this?


--
ChrisV
------------------------------------------------------------------------
ChrisV's Profile: http://www.excelforum.com/member.php...o&userid=36346
View this thread: http://www.excelforum.com/showthread...hreadid=561298


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
SUBTOTAL - TJ TJ Excel Worksheet Functions 4 March 22nd 06 06:06 PM
pivot table : formula to absolute reference a subtotal fax Excel Discussion (Misc queries) 2 November 19th 05 09:28 PM
Subtotal Bug in Excel 2003 GON Excel Discussion (Misc queries) 2 May 10th 05 08:42 PM
Using more than one subtotal with same data set AuthorizedUserPF Excel Worksheet Functions 3 February 28th 05 02:05 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM


All times are GMT +1. The time now is 05:20 PM.

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

About Us

"It's about Microsoft Excel"