Hi C1987,

You can use pivot table in this case which will source the data from Sheet1.... see the attached file.. sheet "Pivot".

book3(1).xlsx

Regards,
DILIPandey

<click on below 'star' if this helps>