Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lunker55
 
Posts: n/a
Default Autofilter past blank rows

I have a macro that puts two blank rows between every row that has a
different day. The problem is the autofilter does not see anything past the
blank rows.
It worked on my old file, and I can't remember how I did it. I'm sure
someone on this group showed me how to do it the first time.
Thanks,
Joe


  #2   Report Post  
Myrna Larson
 
Posts: n/a
Default

You must select the entire list before you go to Data/Filter/AutoFilter.

BTW, to eliminate problems like this, I would delete the blank rows and have
your macro increase the row height when the date changes. The visual effect is
the same, problems like the current one are eliminated.

On Mon, 3 Oct 2005 09:51:03 -0400, "lunker55"
wrote:

I have a macro that puts two blank rows between every row that has a
different day. The problem is the autofilter does not see anything past the
blank rows.
It worked on my old file, and I can't remember how I did it. I'm sure
someone on this group showed me how to do it the first time.
Thanks,
Joe

  #3   Report Post  
lunker55
 
Posts: n/a
Default

Thank you thank you thank you. So simple!
I also like your idea of changing the row height at every date change.
But I'm not sure I like having some rows with data having different row
heights.
Joe

"Myrna Larson" wrote in message
...
You must select the entire list before you go to Data/Filter/AutoFilter.

BTW, to eliminate problems like this, I would delete the blank rows and
have
your macro increase the row height when the date changes. The visual
effect is
the same, problems like the current one are eliminated.

On Mon, 3 Oct 2005 09:51:03 -0400, "lunker55"
wrote:

I have a macro that puts two blank rows between every row that has a
different day. The problem is the autofilter does not see anything past
the
blank rows.
It worked on my old file, and I can't remember how I did it. I'm sure
someone on this group showed me how to do it the first time.
Thanks,
Joe



  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

This uses dates in column A:

Option Explicit
Sub testme()

Dim wks As Worksheet
Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long

Set wks = Worksheets("sheet1")
With wks
.UsedRange.Rows.AutoFit
FirstRow = 2 'headers in 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For iRow = LastRow To FirstRow Step -1
If .Cells(iRow, "A").Value = .Cells(iRow - 1, "A").Value Then
'do nothing
Else
.Rows(iRow).RowHeight = .Rows(iRow).RowHeight * 2
End If
Next iRow
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

lunker55 wrote:

Thank you thank you thank you. So simple!
I also like your idea of changing the row height at every date change.
But I'm not sure I like having some rows with data having different row
heights.
Joe

"Myrna Larson" wrote in message
...
You must select the entire list before you go to Data/Filter/AutoFilter.

BTW, to eliminate problems like this, I would delete the blank rows and
have
your macro increase the row height when the date changes. The visual
effect is
the same, problems like the current one are eliminated.

On Mon, 3 Oct 2005 09:51:03 -0400, "lunker55"
wrote:

I have a macro that puts two blank rows between every row that has a
different day. The problem is the autofilter does not see anything past
the
blank rows.
It worked on my old file, and I can't remember how I did it. I'm sure
someone on this group showed me how to do it the first time.
Thanks,
Joe


--

Dave Peterson
  #5   Report Post  
lunker55
 
Posts: n/a
Default

Thanks Dave. I'll give it a try.
Joe

"Dave Peterson" wrote in message
...
This uses dates in column A:

Option Explicit
Sub testme()

Dim wks As Worksheet
Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long

Set wks = Worksheets("sheet1")
With wks
.UsedRange.Rows.AutoFit
FirstRow = 2 'headers in 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For iRow = LastRow To FirstRow Step -1
If .Cells(iRow, "A").Value = .Cells(iRow - 1, "A").Value Then
'do nothing
Else
.Rows(iRow).RowHeight = .Rows(iRow).RowHeight * 2
End If
Next iRow
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

lunker55 wrote:

Thank you thank you thank you. So simple!
I also like your idea of changing the row height at every date change.
But I'm not sure I like having some rows with data having different row
heights.
Joe

"Myrna Larson" wrote in message
...
You must select the entire list before you go to
Data/Filter/AutoFilter.

BTW, to eliminate problems like this, I would delete the blank rows and
have
your macro increase the row height when the date changes. The visual
effect is
the same, problems like the current one are eliminated.

On Mon, 3 Oct 2005 09:51:03 -0400, "lunker55"
wrote:

I have a macro that puts two blank rows between every row that has a
different day. The problem is the autofilter does not see anything past
the
blank rows.
It worked on my old file, and I can't remember how I did it. I'm sure
someone on this group showed me how to do it the first time.
Thanks,
Joe


--

Dave Peterson



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
HOW CAN I AUTOMATICALLY INSERT ALTERNATE BLANK ROWS IN A LIST? Phil A. Excel Discussion (Misc queries) 1 April 19th 05 04:10 PM
how do I print grid lines for blank rows gailrolfe Excel Discussion (Misc queries) 3 February 25th 05 05:22 AM
How do I delete blank rows at the bottom of a spreadsheet to get . Miklaurie Excel Discussion (Misc queries) 1 January 26th 05 02:30 PM
Blank Rows Acesmith Excel Discussion (Misc queries) 1 November 30th 04 09:23 PM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


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