I still have to learn about macro, so I didn’t use it.
It got confusing when I tried to calculate everything in less commands, so it got REALLY long but it helped me to understand my own logic!!! Lol
Far from being the best solution but I got it correctly!
Thank you for the challenge!!