Need a Excel manipulation Solution

In general we can handle it as a Group by case