Solved

Offset Cell in in filtered table

Posted on 2011-02-16
4
637 Views
Last Modified: 2012-06-27
Hi Experts,

In my VBA code I am using the method below to assign a range to an object variable.

ActiveWorkbook.Sheets("DropDown_Controls").Range(ActiveCell, ActiveCell.End(xlDown))

Open in new window


However, the thing is I want to move down one cell using offset method in a filtered table on the visible part of the table (not the filtered part that can't be seen.) For example:

ActiveSheet.Range("B10").Activate

Open in new window

B10 is the top of the filtered table i.e. the heading. I want to offset Range("B10") to Range ("B15") not Range("B11") because the filtered range begins from Range("B15").

From here I just use
ActiveWorkbook.Sheets("DropDown_Controls").Range(ActiveCell, ActiveCell.End(xlDown))

Open in new window

to set my range.

Thanks,

OS
0
Comment
Question by:onesegun
  • 3
4 Comments
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 34907635
please upload your workbook...
0
 

Author Comment

by:onesegun
ID: 34908148
Hi Fernando,

The work book is pretty confidential.

However, I search the Internet and found exactly what I was looking for.

Thanks,

OS

http://www.ozgrid.com/forum/showthread.php?t=63694&page=1
0
 

Accepted Solution

by:
onesegun earned 0 total points
ID: 34908174
For reference:

C1 reference is where the filtered table starts from

Sub MoveOneCellDownAFilteredList()

Range("C1").Select
ActiveCell.Offset(1, 0).Select
    Do Until ActiveCell.EntireRow.Hidden = False
    ActiveCell.Offset(1, 0).Select
    Loop

End Sub

Open in new window

0
 

Author Closing Comment

by:onesegun
ID: 34941326
Solution found on the Internet
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now