Question: The last time this question was asked it was wrong! Write a function subroutine called NameExists of type Boolean that takes two arguments of type

The last time this question was asked it was wrong! Write a function subroutine called NameExists of type Boolean that takes two arguments of type Range and String, respectively. It should search all of the cells in the given range and check whether any of them have their Value property equal to the given range and check whether any of them have their Value property equal to the given string. For example, if the string is Davis, it should check whether Davis is any of the cells. (A cell containing Sam Davis wouldnt count. The contents have to be Davis exactly, including case.) If so, it should return True. Otherwise, it should return False.

PLEASE add comments I have posted a file, 'Ch10_Ex08_TestSheet.xlsx' to give you a better idea, and please use the file to add your code and test it. O. As instructed, you need to create two subroutines (a main subroutine and a function subroutine called 'NameExists'). In the main subroutine, you need to get two user inputs ((1) range address (e.g., A1:C50), (2) Name String (e.g., James)), and call the function subroutine (by passing the inputs as arguments), and printout the result through Message Box as to whether the name exists or doesn't exist in the range. Again, both the search range and the name should be input from the users and don't get confused by the gray area in the provided file, which doesn't mean anything - Again, I only provided the file so that you can understand the assignment question better and use the file to test your code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!