Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Code to Group Rows Based on Cell Contents

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
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
code to unhide tabs based on cell contents pat67 Excel Worksheet Functions 7 August 26th 11 12:43 AM
VBA Code to Group Rows Based on Cell Contents Pliskers Excel Programming 0 July 9th 06 03:08 AM
Add Rows based on Cell contents Doug Manning Excel Discussion (Misc queries) 0 September 16th 05 07:01 PM
Run code based on cell contents Pete JM[_9_] Excel Programming 2 June 22nd 04 07:09 PM
Code to hide rows based on cell contents Tim[_29_] Excel Programming 5 December 17th 03 02:59 PM


All times are GMT +1. The time now is 04:28 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"