I receive a data extract that consists of several series of rows that
start with a Total Row followed by Detail Rows. The Details below each
total row get grouped so that the user may hide or display them.

The number of Detail Rows changes with each extract, so the grouping
must be redone each time. I'd like to use a conditional formula that
will deliver a "1" in the Total Rows, and a "0" in the detail rows. A
macro would then refer to the column with the conditional formula and
would group all rows with a "0" in that column, creating a new grouping
between the "1's". And, the macro would stop when it hits a blank cell,
which woiuld signify the end of the data extract.

Note that I do NOT want to create subtotals for the rows, I just want
to Group the rows that contain the details (with a "0" in my test
field) as they occur between the rows with "1" in that field.

If that's clear and anyone has code to accomplish this, I'd be most
grateful. Feel free to post any questions if my objective is not clear
enough.

Thanks in advance,