Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Reference the next visible cell

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Reference the next visible cell

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).Selec t
End Sub


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


"Otto Moehrbach" wrote in message ...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Reference the next visible cell

Thanks Ron. I'll give that a try in the morning. Otto
"Ron de Bruin" wrote in message
...
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).Selec t
End Sub


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


"Otto Moehrbach" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Reference the next visible cell

Hi, It's ok.
I found the answer
" For Each cell In myRng" each cell return the correct row number.

Thanks a lot
shlomit

"Otto Moehrbach" wrote:

Thanks Ron. I'll give that a try in the morning. Otto
"Ron de Bruin" wrote in message
...
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).Selec t
End Sub


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


"Otto Moehrbach" wrote in message
...
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




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
Autofilter: jump from visible row to visible row by command button [email protected] Excel Programming 0 November 4th 06 09:04 PM
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. Oscar Excel Programming 6 June 21st 05 10:39 PM
Autoshapes not visible on spreadsheet but visible in print preview John Excel Discussion (Misc queries) 3 February 11th 05 10:23 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 09:17 AM.

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"