Excel - Grouping pre sorted data based on column values

ASH2012

New Member
Joined
May 22, 2012
Messages
6
I have a table with data sorted into rows for review, rows that are ok and rows that are other, between each data set is a blank row. I want to run a macro that:



  1. extracts the data for a person(I've got this),
  2. groups the data by review/OK/other , closing(hiding) 'Ok' and 'other' groupings, the number of rows is variable in these groups with 'other' often having no entries at all (Help!!!!)
  3. exports to a new file ready to be saved(I've got this)

If anybody can help it would be great...
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I have got this far:

Dim ReviewStartRow As Integer, ReviewEndRow As Integer
With Sheets("FD Export")
ReviewStartRow = .Range("B:B").Find(what:="Review", after:=.Range("B4")).Row
ReviewEndRow = .Range("B:B").Find(what:="Review", after:=.Range("B4"), searchdirection:=xlPrevious).Row
End With

But fail when I use the integers to select the rows...

Rows(ReviewStartRow:ReviewEndRow).Select
 
Upvote 0

Forum statistics

Threads
1,216,575
Messages
6,131,504
Members
449,654
Latest member
andz

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
Back
Top