Solved

Select subset of named group in Excel

Posted on 2013-05-17
2
172 Views
Last Modified: 2013-07-04
I have a named column named RESULT which I am processing in VBA. The first row of the RESULT column is a header and should be ignored from processing. What I am looking for is a way I can select a subset of a named group in Excel. In this case the named group is an entire column, and I want to select a subset of this group from row 2 to the last row of the spreadsheet. I am sure there must be an easy way of doing this?
0
Comment
Question by:Blowfelt82
2 Comments
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 39174301
Hello,

try something along the lines of

Sub test()
Dim lrow As Long
   lrow = Cells(Rows.Count, Range("MyRange").Column()).End(xlUp).Row
   Range(Cells(2, Range("MyRange").Column()), Cells(lrow, Range("MyRange").Column())).Select
End Sub

Open in new window


cheers, teylyn
0
 
LVL 7

Expert Comment

by:manthanein
ID: 39180419
found  this on the web..

 selection.Offset(1, 0).Resize(selection.Rows.Count - 1, selection.Columns.Count).Select 

Open in new window

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

758 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

23 Experts available now in Live!

Get 1:1 Help Now