0

I am getting an Excel 2010 Workbook with chunks of data. There are a variable number of blank rows between each chunk of data. Here's what I do with the data using macros:

  1. I copy the data from the source workbook into a workbook with my macros.
  2. I remove the blank rows.
  3. I then sort the data with 4 sort criteria.
  4. I then use an advanced filter to extract 6 of the 26 different types of data.
  5. I then use the VBA code within a macro found here: How to automatically insert a blank row after a group of data to add a blank row after each unique value in Column A, but I am getting numerous blank rows as it appears to be adding a blank rows based on the original data, not the filtered data:

What I need is a way to add a blank row after each unique value in column A after the data is filtered to add sub-totals and counts.

Community
  • 1
  • 1
  • You need to post your current code, a data sample and an expected result. – Mr. Mascaro Apr 02 '15 at 19:15
  • This likely involves having to check if the cell is visible. If you are working on a Range object, you can filter it down with `.SpecialCells(xlCellTypeVisible)`. If you are just using single cells or something else, this link may help: http://stackoverflow.com/questions/11943200/how-to-determine-if-a-worksheet-cell-is-visible-displayed-in-vba – Byron Wall Apr 02 '15 at 20:05

1 Answers1

0

You might copy the filtered data to a separate spreadsheet tab then do the insert. Otherwise you will have to use the SpecialCells property mentioned above, which is much more complex.

rgo
  • 481
  • 4
  • 11