Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find number of occurences in a array

Status
Not open for further replies.

swetham

Programmer
May 5, 2010
257
DE
I have a multi-dimensional array as follows,

dim examp(4,3) as string


examp(0,0)="1"
examp(0,1)="2"
examp(0,2)="3"

examp(1,0)="6"
examp(1,1)="4"
examp(1,2)="8"

examp(2,0)="1"
examp(2,1)="2"
examp(2,2)="3"

examp(3,0)="5"
examp(3,1)="2"
examp(3,2)="3"

now i need to find the row number where 1st & 2nd column values are 2,3. Output will be 0,1,2

Can anyone please help me out from this issue?
 

Output will be 0,1,2

Don't you want the output to be 0,2,3?

examp(0,0)="1"
examp(0,1)=[blue]"2"[/blue]
examp(0,2)=[blue]"3"[/blue]

examp(1,0)="6"
examp(1,1)="4"
examp(1,2)="8"

examp(2,0)="1"
examp(2,1)=[blue]"2"[/blue]
examp(2,2)=[blue]"3"[/blue]

examp(3,0)="5"
examp(3,1)=[blue]"2"[/blue]
examp(3,2)=[blue]"3"[/blue]


Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top