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

x
?
Solved

Select subset of named group in Excel

Posted on 2013-05-17
2
Medium Priority
?
220 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:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

927 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