Develop a macro to solve below problem

Printable View