Please help with this macro:

Pins are your friend.