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


Hi all,

I have filled a 2d array with values - can i find out the size of the
array WHERE Arry(1, i) = 'WB01' - for example.

TIA


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=526695

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array Ubound


Are you asking how to count the number of occurances where the array
contains "WB01"

regards


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=526695

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array Ubound


yes i am,

suppose I would just loop through the entire array and set up a count
where array = 'WB01' - thought I might just be able to use ubound with
a criteria set on it?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=526695

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array Ubound

UBound(Arry,1)

and

UBound(Arry,2)

for the two dimensions of the array

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"gti_jobert" wrote
in message ...

Hi all,

I have filled a 2d array with values - can i find out the size of the
array WHERE Arry(1, i) = 'WB01' - for example.

TIA


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array Ubound

You could drop it onto a spreadsheet and count those

Range("M1:N10") = arry
MsgBox Application.CountIf(Range("M1:N10"), "WB01")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"gti_jobert" wrote
in message ...

yes i am,

suppose I would just loop through the entire array and set up a count
where array = 'WB01' - thought I might just be able to use ubound with
a criteria set on it?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:

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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Array Ubound

UBound provides the current upper bound of the specified dimension of the
array.

I suspect there is nothing faster than looping through the array. Set it up
as a function that accepts the array and the target string as arguments and
you will have a reusable routine.


--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

yes i am,

suppose I would just loop through the entire array and set up a count
where array = 'WB01' - thought I might just be able to use ubound with
a criteria set on it?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:
http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=526695


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 200
Default Array Ubound

If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook

ArrayCountIf(Arry,"WB01") will return the number of occurrences.

Alan Beban

gti_jobert wrote:
yes i am,

suppose I would just loop through the entire array and set up a count
where array = 'WB01' - thought I might just be able to use ubound with
a criteria set on it?


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
Why is this returning a Ubound value of zero [email protected] Excel Discussion (Misc queries) 1 September 28th 07 07:44 PM
UBound of multi-dimensional array? Jake Marx[_3_] Excel Programming 0 August 16th 05 06:34 PM
Handling ubound on an uninitialised array Mike NG Excel Programming 14 January 24th 05 09:05 AM
Ubound & Lbound Michael168[_80_] Excel Programming 3 June 1st 04 02:00 PM


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

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"