Write a macro that implements the procedure


Problem

Suppose you have a grid of numbers entered into cells C2:M11. Write a macro that implements the following procedure.

1. Reads the entries in the grid into an array.

2. Displays an Input Box that only accepts numbers as entries which is entitled "Target number" and says "Please enter the number you wish to find". If the wrong type of entry is made then the Input Box should reappear until a number is entered.

3. Displays an Input Box that only accepts numbers as entries which is entitled "Allowable error" and says "Please enter the allowable error". If the wrong type of entry is made then the Input Box should reappear until a number is entered. If the entry is negative then a Message Box should be displayed saying "Please enter a positive number" and the Input Box should reappear until a positive number is entered.

4. Replace all numbers in the array that are not within the error value of the target number by the letter X, and write the result into cells C16:M25. (For example, if the error value is 3 and the target number is 6, all numbers x except those in the range 3 ≤ x ≤ 9 would be replaced by the letter X.)

Declare all variable types and include appropriate comments in your code.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a macro that implements the procedure
Reference No:- TGS03277027

Expected delivery within 24 Hours