Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

offset entire range

Posted on 2012-04-02
2
Medium Priority
?
292 Views
Last Modified: 2012-04-02
Hi,

What is the Syntax for Offsetting 18 columns across and then till the end of the rows. But i need the entire selection selected.

Normally i would say
 Range(Selection, Selection.End(xlToRight)).Select
 Range(Selection, Selection.End(xlDown)).Select

But there is gaps in the data, so i need to specifically say 18 Columns to the right and down to end.

Thanks
Seamus
0
Comment
Question by:Seamus2626
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 37795438
I'm guessing you mean:

Range(Selection, Selection.Offset(0, 18).End(xlDown)).Select

Open in new window


but there is rarely any need to select anything.

Depending on the layout, you may also be able to use:

Selection.CurrentRegion.Select

Open in new window

0
 

Author Closing Comment

by:Seamus2626
ID: 37795456
Range(Selection, Selection.Offset(0, 18).End(xlDown)).Select

That works perfectly for me Rory, just need to clear some errors and this is the quickest way to do it.

Thanks
Seamus
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

885 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