JoshG Posted October 10, 2016 Share Posted October 10, 2016 I need to run a program based on a list of #'s if the query shows its is in the list it should run. i.e. list of #s [1122, 5337, 5339, 5440] if $storeNum is( in above list/array) continue if not exit... my other option would be to list all of my possible stores#'s with a yes no flag [1122, yes 1130,no 5337,yes 5338,no 5339,yes 5440,yes] Any ideas how i can create the query that will result in positive if it sees the# and false if it does not? basically do an excel countif.. Thanks in advance for any and all help Link to comment Share on other sites More sharing options...
AutoBert Posted October 10, 2016 Share Posted October 10, 2016 Use a Array and _ArraySearch. Link to comment Share on other sites More sharing options...
JoshG Posted October 10, 2016 Author Share Posted October 10, 2016 can i just use the error codes on a search? I just want to see if a # is in my array and if so true if not false? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 10, 2016 Moderators Share Posted October 10, 2016 @JoshG you probably could have tested this out yourself faster than you wrote the question... #include <Array.au3> Local $aNum[6] = [1122, 1130, 5337, 5338, 5339, 5440] _ArraySearch($aNum, 5338) ConsoleWrite(((@error) ? "Not Present" : "Present") & @CRLF) JoshG 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
JoshG Posted October 10, 2016 Author Share Posted October 10, 2016 that worked thanks for the help If Not @error Then If Not @error Then ;run code else ;dont run code endif Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now