Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ListBox: How to determine length of list in different columns


Suppose I have worksheet data covering A1:A50; B1:B85, C1:C100, D1:D5
and this is loaded into a listbox using the RowSource property, how
could I, -without reference to the worksheet-, return the number of
rows (seperately) in Columns 1,2,3 and 4. In this instance, the
solution will be 50 for Column1, 85 for Column2, 100 for Column3 and 5
for Column4.

Note that using ListBox1.ListCount property inappropriately produces
the Maximum row length of 100.

Thanks.


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=507530

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ListBox: How to determine length of list in different columns

First, it would be silly not to use the range if that was the easiest answer
and certainly no reason not to.

Your choices with that limitation are pretty much to loop through each row
in your list and count.

Why do you say the Listcount result of 100 is inappropriate. You have 100
rows in the list, so that is the appropriate answer.
--
Regards,
Tom Ogilvy

"Myles" wrote in
message ...

Suppose I have worksheet data covering A1:A50; B1:B85, C1:C100, D1:D5
and this is loaded into a listbox using the RowSource property, how
could I, -without reference to the worksheet-, return the number of
rows (seperately) in Columns 1,2,3 and 4. In this instance, the
solution will be 50 for Column1, 85 for Column2, 100 for Column3 and 5
for Column4.

Note that using ListBox1.ListCount property inappropriately produces
the Maximum row length of 100.

Thanks.


--
Myles
------------------------------------------------------------------------
Myles's Profile:

http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=507530



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
Calculate Months to Determine Length of Service WilliamsDeLisle Excel Worksheet Functions 11 April 13th 09 09:51 PM
How to determine the arc length in Excel? Eric Excel Discussion (Misc queries) 5 September 16th 07 04:20 PM
How to determine the length of a .prn file. Richard Buttrey[_5_] Excel Programming 5 June 25th 04 07:49 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Determine maximum length of a page Vasant Nanavati[_2_] Excel Programming 0 July 12th 03 03:20 AM


All times are GMT +1. The time now is 09:59 PM.

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

About Us

"It's about Microsoft Excel"