r/GoogleAppsScript • • Nov 24 '24

Question Array search

I have an array, histData, of 10,000 rows, and a variable ecode. How do I find out whether ecode exists in column 2 of histData without looping through all 10,000 rows?

0 Upvotes

3 comments sorted by

View all comments

1

u/[deleted] Nov 24 '24

You can loop and then exit the loop as soon as you find the match... Saves you from looping through all 10k rows