laurie9300
New Member
- Joined
- Jan 30, 2017
- Messages
- 9
I've been a VBA hack for a few years now, and have always managed find and modify code as needed, and learn a little along the way, until now.
I'm doing a large amount of processing over 2 worksheets, and this last step has me confuddled. I have found some code that does each step, but cannot seem to marry them all together.
This processing needs to be done on "Sheet1"
There are 2 values involved and I need to step through all rows:
Date values in Column J
Labour minutes (integer) in Column Q
Each row needs to represent 1 workday of 426 minutes, but some jobs have more than 426 minutes allocated. I need to find and duplicate these rows modifying the labour minutes and date as I go.
If the value in Column Q < 426 - do nothing
If the value in Column Q > 426 - copy the row and paste it underneath - subtract 426 from the original row - in the new row Q = 426 and subtract 1 workday from J in the new row
Before:
After:
Adding new columns for the date or labour is not a problem, nor is the row order as the data is being referenced in another sheet.
Any help will be greatly appreciated..................
I'm doing a large amount of processing over 2 worksheets, and this last step has me confuddled. I have found some code that does each step, but cannot seem to marry them all together.
This processing needs to be done on "Sheet1"
There are 2 values involved and I need to step through all rows:
Date values in Column J
Labour minutes (integer) in Column Q
Each row needs to represent 1 workday of 426 minutes, but some jobs have more than 426 minutes allocated. I need to find and duplicate these rows modifying the labour minutes and date as I go.
If the value in Column Q < 426 - do nothing
If the value in Column Q > 426 - copy the row and paste it underneath - subtract 426 from the original row - in the new row Q = 426 and subtract 1 workday from J in the new row
Before:
After:
Adding new columns for the date or labour is not a problem, nor is the row order as the data is being referenced in another sheet.
Any help will be greatly appreciated..................