Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Defining Range

How do I define a range from sheet1!a2 to the last nonempty cell in the A
column
The name of the range should be equal to sheet!a1 ( the top most cell )

similarly for other columns b, c, d, e





  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Defining Range

With Worksheets("Sheet1")
set rng = .Range(.Range("A2"),.Cells(rows.count,1).End(xlup) )
End With


similarly for b, c, d, e

--
Regards,
Tom Ogilvy

"MAB" wrote in message
...
How do I define a range from sheet1!a2 to the last nonempty cell in the A
column
The name of the range should be equal to sheet!a1 ( the top most cell )

similarly for other columns b, c, d, e







  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Defining Range

Hi

Without VBA

=OFFSET(Sheet1!$A$2,,,COUNTIF(Sheet1!$A:$A)-1)
but you have to enter the name manually. And you mustn't have gaps in column
A.


Arvi Laanemets


"MAB" wrote in message
...
How do I define a range from sheet1!a2 to the last nonempty cell in the A
column
The name of the range should be equal to sheet!a1 ( the top most cell )

similarly for other columns b, c, d, e







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Defining a Range using Variables Billyruben Excel Discussion (Misc queries) 3 December 2nd 08 06:31 PM
Defining a Range with Criteria Mark R. Excel Discussion (Misc queries) 3 August 19th 08 05:55 PM
Defining Range Name anshu[_2_] Excel Discussion (Misc queries) 2 July 22nd 07 07:30 AM
help defining dynamic range joecrabtree Charts and Charting in Excel 0 December 6th 06 03:33 PM
Defining a range Don Excel Worksheet Functions 1 February 25th 05 03:54 PM


All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"