Write a function in VBA that tests whether the argument it receives is contained within a given range. If it is, return the numerical value “1”, otherwise, return “0”.
Once you’ve done this, please write a second function called =NONMEMBER. Once you’ve written =MEMBER, this one is easy. =NONMEMBER should call the =MEMBER function. To do this, you need to figure out how to write a “for loop”.
Note: There are other ways to accomplish the same thing without VBA. For example, you could use the =MATCH function or the =VLOOKUP function, and both would error out if there was no match. And, if there were a match, those functions would return the match or its position. So, it’s possible to use out of the box functions, just a bit more work.