Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculate number of records in a Group
Nigel,
Depending in your data, you may be able to use the CurrentRegion.Rows.Count property j = ActiveCell.CurrentRegion.Rows.Count If you know where the first row of any group starts, you can activate that cell then use the ActiveCell.CurrentRegion.Rows.Count property. Hope this helps. Greg Nigel wrote: I have data in a spreadsheet that is grouped by Customer and between each grouping there are 2 blank lines What I have to do is calculate the sum of the a column (for example Y) so for the first customer it would be sum(y7:y23) and for the next customer it would be sum(y26:y30) but when I rerun the data it might be (Y7:y15) and (y18:y22) and so forth depending on the conditions I apply Is there any way I can calculate the number of records each grouping contains, In column B at the top of the group will be the customer name and in column B at the end of the group the customer name will appear again if that helps to calculate the number of rows inclusive of the top and bottom rows |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to calculate with vba the number of records in an excel- table? | Excel Discussion (Misc queries) | |||
how to calculate with vba the number of records in an excel- table? | Excel Programming | |||
how to group records in a new worksheet | Excel Worksheet Functions | |||
how to group records in a new worksheet | Excel Discussion (Misc queries) | |||
count duplicate records in a group | Excel Worksheet Functions |