> lnElement=ASCAN(arooms,ALLTRIM(ctSchedShow.RoomName),1,ALEN(arooms,1),1) > lnSubScript=ASUBSCRIPT(arooms,lnElement,1) > nCount=aRooms[lnSubScript,2] >You can pass -1 for the third and fourth parameters to basically say "ignore these, do the entire array". Another tip: include 8 in the last parameter to return the row number rather than the element number, and you can skip the call to ASUBSCRIPT:
lnRow=ASCAN(arooms,ALLTRIM(ctSchedShow.RoomName),-1,-1,1,8) nCount=aRooms[lnRow,2]The last parameter can also be used to make the search case-insensitive and to control the exactness setting.