Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to determine a range size

I want to know the number of data lines in an imported
file (text file), so I can define an exact range using VBA
after it's imported. Is there a function I can use?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to determine a range size


-----Original Message-----
I want to know the number of data lines in an imported
file (text file), so I can define an exact range using

VBA
after it's imported. Is there a function I can use?
.

After the file is Imported

'get in the range
Range("A2").select
nr = activecell.currentregion.rows.count

or

nr = application.worksheetfunction.counta(Range("A:A"))

Regards
Peter
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
How to determine what is causing large size Dave H Excel Discussion (Misc queries) 1 August 7th 09 08:40 PM
How can I determine the largest physical size cell in a column csa001 Excel Worksheet Functions 2 June 22nd 06 02:33 PM
Determine size of listbox Jasper Excel Discussion (Misc queries) 3 April 18th 06 10:38 PM
Determine active file size pk Excel Programming 1 October 27th 03 03:46 PM
How to determine JPG size in pixels? dchow Excel Programming 3 September 26th 03 02:22 AM


All times are GMT +1. The time now is 09:54 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"