Solved

Excel VBA - Defining table based on CurrentCell.ActiveRegion

Posted on 2012-03-22
1
257 Views
Last Modified: 2012-03-22
What is the cleanest way to define a range that is the current region without the top row?
If I start with ActiveCell.CurrentRegion, how do I set rTableSansTopRow (below)?

Set rWholeTable=ActiveCell.CurrentRegion

Set rTableSansTopRow=[code???]

Thanks, --Andres
0
Comment
Question by:AndresHernando
[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
1 Comment
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 37752385
You could use:
With rWholeTable
Set rTableSansTopRow = .resize(.rows.count - 1).Offset(1)
End With

Open in new window

0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

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.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

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