Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofilter: jump from visible row to visible row by command button | Excel Programming | |||
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. | Excel Programming | |||
Autoshapes not visible on spreadsheet but visible in print preview | Excel Discussion (Misc queries) | |||
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. | Excel Worksheet Functions | |||
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable | Excel Worksheet Functions |