Solved

Select subset of named group in Excel

Posted on 2013-05-17
2
191 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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

777 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