Solved

Offset Cell in in filtered table

Posted on 2011-02-16
4
680 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 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