Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Select subset of named group in Excel

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
Blowfelt82
Asked:
Blowfelt82
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
 
manthaneinCommented:
found  this on the web..

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

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now