?
Solved

Offset Cell in in filtered table

Posted on 2011-02-16
4
Medium Priority
?
693 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

801 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