Solved

offset entire range

Posted on 2012-04-02
2
253 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sum Based On Criteriya 7 19
Display the VBA Userform in Screen Center 4 31
Problem to With line 4 39
NEED TO UPDATE DATA IN EXCEL 18 29
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now