Question: Write a VBA code that calculates the total area of the rectangles that can be created with neighbour x ' s in a given 4
Write a VBA code that calculates the total area of the rectangles that can be
created with neighbour s in a given square matrix including s and
Os
x square matrix will include only Xs and Os in an Excel sheet starting
from
Example:
When clicked on calculate button, message box should show
Details of the solution is listed below:
The rectangles with a single square: A D B D A B C D B C
Total area:
The rectangles with squares: AB BC CD BC BB BB
CC DD DD
Total area:
The rectangles with squares: ABC BCD BBB DDD
Total area:
The rectangles with squares: ABCD BCBC
Total area:
Notes:
I will test your code with at least different input sets.
A single square is also a rectangle.
Both width and length of the rectangle can be greater than unit.
Please show your answer in a message box.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
