LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Grouping rows based on header cells

Ingenious! Thanks Dave.

On Sep 19, 9:36 pm, Dave Peterson wrote:
I'd try to put the department name on each row.

I inserted a new column A.
I put this in A1: =TRIM(MID(B1,12,255))
(It returned "Human Resources")
Then I put this in A2: =IF(LEFT(B2,11)="department:",TRIM(MID(B2,12,255)) ,A1)
and dragged that formula down as far as column B had data.

I ended up with:

Human Resources DEPARTMENT: Human Resources
Human Resources Adam Brown
Human Resources Cecil Davies
Finance DEPARTMENT: Finance
Finance Elliot Farthing
Finance Gary Holmes
Finance Ian Jacobs
Human Resources DEPARTMENT: Human Resources
Human Resources Kris Lambs
Finance DEPARTMENT: Finance
Finance Mark Namara

Then I could convert column A to values
(select column A, Edit|copy, edit|paste special|values)

and do what I wanted with the data...including filtering column B to show only
those rows that begin with "department: " and delete those visible rows.


 
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
Highting rows based on content of cells Sarah Excel Worksheet Functions 1 January 24th 07 09:44 PM
Conditionally summing cells based on conditions in other rows Bert Excel Worksheet Functions 3 June 20th 06 11:06 AM
grouping rows with blank cells Emmweb Excel Worksheet Functions 3 April 10th 06 08:24 PM
List rows in an order based on a cells value Josh M Excel Discussion (Misc queries) 0 September 14th 05 04:51 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM


All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"