excel check if in list
=IF(ISNUMBER(MATCH(B2,A:A,0)),1,0)
B2 is value to be looked up
A:A is list Range
excel check if in list
=IF(ISNUMBER(MATCH(B2,A:A,0)),1,0)
B2 is value to be looked up
A:A is list Range
tcl check if value exists in list
# Make List object
set List_to_Search [list 1 2 3 4 5 6 7 8 9];
# Identify item to search for:
set findMe 7;
# Search List using lsearch, returns index of first occurrence found
set index [lsearch $List_to_Search $findMe];
# > 6
puts "$findMe = [lindex $List_to_Search $index]";
# If object isn't contained in list - returns '-1' as index:
set notFound [lsearch $List_to_Search 99];
puts "99 not found in List; $notFound";
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us