Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Goto Next VISIBLE cell below

Current activecell is A13 and I'm using autofilter. What the VBA command to
go to the next VISIBLE cell below - i.e. A21 ?

Regards,
Rasmus


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Goto Next VISIBLE cell below

Rasmus,

I think you'd need to loop downwards, checking the Hidden
property of the row.

Dim Rng As Range
Set Rng = ActiveCell
Do
Set Rng = Rng(2, 1)
Loop Until Rng.EntireRow.Hidden = False


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Rasmus" wrote in message
t.cable.rogers.com...
Current activecell is A13 and I'm using autofilter. What the

VBA command to
go to the next VISIBLE cell below - i.e. A21 ?

Regards,
Rasmus




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Goto Next VISIBLE cell below

Rasmus wrote:
Current activecell is A13 and I'm using autofilter. What the VBA
command to go to the next VISIBLE cell below - i.e. A21 ?


Hi, Rasmus.

Try this

......
ActiveCell.Offset(1, 0).Activate
Do While ActiveCell.EntireRow.Hidden = True
ActiveCell.Offset(1, 0).Activate
Loop
......



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Goto Next VISIBLE cell below

Dim rng as Range
set rng = Range("A13")
do
set rng = rng.offset(1,0)
Loop while rng.entireRow.Hidden = True
rng.Select



--
Regards,
Tom Ogilvy

"Rasmus" wrote in message
t.cable.rogers.com...
Current activecell is A13 and I'm using autofilter. What the VBA command

to
go to the next VISIBLE cell below - i.e. A21 ?

Regards,
Rasmus




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Goto Next VISIBLE cell below

Try this:

Dim rng As Range
Dim i As Long
For Each rng In Range(ActiveCell, Cells(Rows.Count,
ActiveCell.Column)).SpecialCells(Type:=12, Value:=23)
If i 0 Then
rng.Select
Exit For
End If
i = i + 1
Next

--
Soo Cheon Jheong
http://excel.hompy.com




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Goto Next VISIBLE cell below

why not just

Range(ActiveCell.Offset(1,0), _
Cells(Rows.Count,ActiveCell.Column)). _
SpecialCells(Type:=12, Value:=23)(1).Select

Add error checking of course

--
Regards,
Tom Ogilvy


"Soo Cheon Jheong" wrote in message
...
Try this:

Dim rng As Range
Dim i As Long
For Each rng In Range(ActiveCell, Cells(Rows.Count,
ActiveCell.Column)).SpecialCells(Type:=12, Value:=23)
If i 0 Then
rng.Select
Exit For
End If
i = i + 1
Next

--
Soo Cheon Jheong
http://excel.hompy.com




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
Goto Cell With Today's Or Other Date jonoro Excel Worksheet Functions 2 December 22nd 09 02:43 AM
find the last Fred and goto cell Steved Excel Worksheet Functions 6 October 11th 07 06:53 PM
Goto a specific cell in a macro Edward Excel Discussion (Misc queries) 0 July 16th 07 08:24 PM
goto a particular cell Newbie Excel Programming 5 April 15th 04 01:46 PM
Goto next empty cell in a range Keith Robinson Excel Programming 2 November 15th 03 03:52 AM


All times are GMT +1. The time now is 12:54 PM.

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"