Loop within Subtotaled Data

macman1314

New Member
Joined
Oct 3, 2010
Messages
3
I have used the subtotal function to break up my data. Now I need to figure out a way to process each line within the subtotal. When the number of lines vary for each subtotal grouping.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

hiker95

Well-known Member
Joined
Apr 8, 2009
Messages
17,649
macman1314,

Welcome to the MrExcel forum.

What version of Excel are you using?

You will generally get much more help (and faster) in this forum if you can post your small samples directly in the forum.

Please attach screenshots of your workbook or a sample workbook that accurately portrays your current workbook on one sheet, and what it should look like 'After' on another sheet.

This makes it much easier to see exactly what you want to do, as well as shows us whether there is a consistent number of rows between tables and such.

Here are three possible ways to post small (copyable) screen shots directly in your post:

Please post a screenshot of your sheet(s), what you have and what you expect to achieve, with Excel Jeanie HTML 4 (contains graphic instructions).
http://www.excel-jeanie-html.de/html/hlp_schnell_en.php

or
RichardSchollar’s beta HTML Maker -...his signature block at the bottom of his post

or
Borders-Copy-Paste



If you are not able to give us screenshots:

To get the most precise answer, it is best to upload/attach a sample workbook (sensitive data scrubbed/removed) that contains an example of your raw data on one worksheet, and on another worksheet your desired results.

The structure and data types of the sample workbook must exactly duplicate the real workbook. Include a clear and explicit explanation of your requirements.

You can upload your workbook to www.box.net and provide us with a link to your workbook.
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Now I need to figure out a way to process each line within the subtotal.

What do you mean by "process each line"? If you want to add a secondary layer of subtotals, then you need to do that programmatically via VBA.
 

macman1314

New Member
Joined
Oct 3, 2010
Messages
3
It can be for 2003 2007 or 2010 we have all 3 here.

Will try to get the workbooks up soon busy day at work here.

Basicly I am doing timesheet corrections.

I have gotten raw data from payroll found the problem fixed the problem now have to resubmit.

I have the code that works fine to take one line of data and populate the second sheet(time sheet). Now my issue is if in one week they work on more then one project or sumbit overtime i have more then one line to move to the time sheet

blah balah subtotal
Project 1 joe smith weekending jan 8 2010 billcode Regtime 8
Project 2 joe smith weekending jan 8 2010 billcode Regtime 8
Project 3 joe smith weekending jan 8 2010 billcode Regtime 8
Project 3 joe smith weekending jan 8 2010 billcode Overtime 8
Project 4 joe smith weekending jan 8 2010 billcode Regtime 8
Jan 8 2010 Subtotal 40

What I need to figure out is how to reconize each block of subtotals and pass it to my other code write it to the time sheet and goto the next block.
 

Forum statistics

Threads
1,141,734
Messages
5,708,162
Members
421,549
Latest member
Dtcfire

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top