Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Reference the next visible cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Otto Moehrbach - 26 Nov 2006 21:34 GMT
Excel XP & Win XP
I have a variable number of columns after Column B hidden.  With the active
cell, B4, how can I reference the next visible cell in row 4?
Thanks for your time.  Otto
Ron de Bruin - 26 Nov 2006 21:46 GMT
You can try this  Otto with the cell in B active

Sub test()
Dim rng As Range
Set rng = Range(Cells(ActiveCell.Row, ActiveCell.Column + 1), Cells(ActiveCell.Row, Columns.Count))
rng.SpecialCells(xlCellTypeVisible).Cells(1).Select
End Sub

Signature

Regards Ron de Bruin
http://www.rondebruin.nl

> Excel XP & Win XP
> I have a variable number of columns after Column B hidden.  With the active
> cell, B4, how can I reference the next visible cell in row 4?
> Thanks for your time.  Otto
Otto Moehrbach - 27 Nov 2006 00:18 GMT
Thanks Ron.  I'll give that a try in the morning.  Otto
> You can try this  Otto with the cell in B active
>
[quoted text clipped - 9 lines]
>> active cell, B4, how can I reference the next visible cell in row 4?
>> Thanks for your time.  Otto
Shlomit - 21 Jan 2007 11:21 GMT
Hi,  It's ok.
I found the answer
" For Each cell In myRng" each cell return the correct row number.

Thanks a lot
shlomit

> Thanks Ron.  I'll give that a try in the morning.  Otto
> > You can try this  Otto with the cell in B active
[quoted text clipped - 10 lines]
> >> active cell, B4, how can I reference the next visible cell in row 4?
> >> Thanks for your time.  Otto
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.