Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Drop to next visible row when filtered?

I want my macro to enter a formula in a cell, then drop to the next visible
cell one row down when I'm in AutoFilter mode. I tried
ActiveCell.Offset(1, 0).Activate
but that drops it to the next row even if it's hidden by the filter. Can I
put SpecialCells(xlVisible) in here somehow?

Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Drop to next visible row when filtered?

Ed,

You can use code like the following:

Dim i As Long

i = 1
With ActiveCell
Do Until .Offset(i).EntireRow.Hidden = False
i = i + 1
Loop
.Offset(i).Select
End With


--

John Green - Excel MVP
Sydney
Australia


"Ed" wrote in message ...
I want my macro to enter a formula in a cell, then drop to the next visible
cell one row down when I'm in AutoFilter mode. I tried
ActiveCell.Offset(1, 0).Activate
but that drops it to the next row even if it's hidden by the filter. Can I
put SpecialCells(xlVisible) in here somehow?

Ed




  #3   Report Post  
Posted to microsoft.public.excel.programming
pk pk is offline
external usenet poster
 
Posts: 4
Default Drop to next visible row when filtered?

Try something like the following:

Do
r = r + 1
If ActiveCell.Offset(r, 0).EntireRow.Hidden = True Then
Else
Exit Do
End If
Loop
ActiveCell.Offset(r, 0).Select

-----Original Message-----
I want my macro to enter a formula in a cell, then drop

to the next visible
cell one row down when I'm in AutoFilter mode. I tried
ActiveCell.Offset(1, 0).Activate
but that drops it to the next row even if it's hidden by

the filter. Can I
put SpecialCells(xlVisible) in here somehow?

Ed


.

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
Average Last 100 Filtered Visible rows Sam via OfficeKB.com Excel Worksheet Functions 4 September 18th 09 02:12 AM
countif only visible cells (filtered) [email protected] Excel Worksheet Functions 8 August 16th 07 04:39 PM
Copy visible cells on Filtered data [email protected] Excel Discussion (Misc queries) 4 July 18th 07 08:18 AM
count if on Visible - Filtered tonyv Excel Worksheet Functions 4 July 7th 07 07:34 PM
average of visible cells in a filtered range dave roth Excel Worksheet Functions 5 May 23rd 05 12:56 PM


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