Solved

Offset Cell in in filtered table

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

739 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