You are not going to learn how to do this from any video.
My advice would be to use the Macro recording function in Excel
- Make sure the Developer Tab is available in the Ribbon
- Select Macros, Record Macro
- Manually do the above steps
- Select Macros, Stop Recording
Examine the code that has been recorded to understand how to continue. Do not just leave the code "as is", it will require attention.
Next get yourself a good book or a course and start to learn VBA - here are some resources, but note that I do not necessarily endorse or recommend these
Learn VBA Online – Tutorial for Beginners (Free & Interactive)[
^]
https://www.coursera.org/courses?query=vba[
^]
Excel VBA Programming - a free course for complete beginners[
^]