Solved

Offset Cell in in filtered table

Posted on 2011-02-16
4
688 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

691 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