Solved

Excel VBA - Defining table based on CurrentCell.ActiveRegion

Posted on 2012-03-22
1
253 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
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

726 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