Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Offset question 1

Status
Not open for further replies.

ballbearing

Technical User
Jan 7, 2004
43
US

Here's the deal...seems easy but can't figure this one out.

These columns are selected:
Columns("F:L").Select
If I use an offset, such as:
Columns("F:L").Offset(0, 1) the entire range is offset to "G:M"
What I want to do is (by using an offset) is change this range to:
Columns("F:M").Select

Can't seem to figure this one out on my own.

Thanks

Gawd I love this Access stuff..too bad I don't know what I'm doing.
 
You need the RESIZE function:
Code:
Columns("F:L").Select
numRows = Selection.Rows.Count
numColumns = Selection.Columns.Count
Selection.Resize(numRows, numColumns + 1).Select

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Oh! RESIZE!!!

Never occurred to me. DUH!!
NOW I can go on with life. Hahahaha
Thanks Geoff!

Gawd I love this Access stuff..too bad I don't know what I'm doing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top