Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count series in range


I am writing an Excel function in VBA, but I am stuck on this:

I need to count the number of series in a range:

A column has a several ranges of numbers, split by blank cells:

1
0.5
1


1
1
1
1
1

1
1

I need to count the series of numbers, which in this case 3: (1, 0.5,1
and (1,1,1,1,1) and (1,1)

How do I do this from a passed range in VBA, please

Thank

--
rjhar

-----------------------------------------------------------------------
rjhare's Profile: http://www.excelforum.com/member.php...fo&userid=1141
View this thread: http://www.excelforum.com/showthread.php?threadid=47293

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count series in range

rng.specialcells(xlconstants,xlnumbers).Areas.coun t

where rng represents the passed range.

--
Regards,
Tom Ogilvy

"rjhare" wrote in
message ...

I am writing an Excel function in VBA, but I am stuck on this:

I need to count the number of series in a range:

A column has a several ranges of numbers, split by blank cells:

1
0.5
1


1
1
1
1
1

1
1

I need to count the series of numbers, which in this case 3: (1, 0.5,1)
and (1,1,1,1,1) and (1,1)

How do I do this from a passed range in VBA, please

Thanks


--
rjhare


------------------------------------------------------------------------
rjhare's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count series in range


Thanks, but this did not work for me (XL2k on W2kSP4)

I have managed a workaround though.

Thanks to all those that viewe

--
rjhar

-----------------------------------------------------------------------
rjhare's Profile: http://www.excelforum.com/member.php...fo&userid=1141
View this thread: http://www.excelforum.com/showthread.php?threadid=47293

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count series in range

Great, but
Just others are not deceived by your inability to implement and are not
forced to employ some cumbersome workaround

from the immediate window:

set rng = Columns(1)
? rng.specialcells(xlconstants,xlnumbers).Areas.coun t
8


--
Regards,
Tom Ogilvy


"rjhare" wrote in
message ...

Thanks, but this did not work for me (XL2k on W2kSP4)

I have managed a workaround though.

Thanks to all those that viewed


--
rjhare


------------------------------------------------------------------------
rjhare's Profile:

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



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
Count Data in Series Demosthenes Excel Worksheet Functions 2 March 31st 10 05:02 PM
Multiple Criteria, Count If, Sum Product to get count across range Jonathan Excel Worksheet Functions 5 January 9th 08 11:32 PM
Fills Series options sometimes messes the count!!! Sort by Room and ABC[_2_] Excel Discussion (Misc queries) 3 September 26th 07 02:27 AM
x y scatter chart series ranges reset to x(range) = y(range) Brakerm19 Charts and Charting in Excel 4 September 26th 06 11:13 PM
Primary/Secondary Axis series count raydenl Charts and Charting in Excel 1 July 28th 05 08:36 AM


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