If you are a 'recursion newbie', you may want to first read Getting started with recursion, or take a look at a real, but simple example with How to traverse a treeview

Getting to grips with recursion

Recursion Introduction -  that most elusive of techniques. 2 challenge projects developed as we go along.

You want to learn Google Apps Script?

Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, All formats are available from O'ReillyAmazon and all good bookshops. You can also read a preview on O'Reilly

If you prefer Video style learning I also have two courses available. also published by O'Reilly.
Google Apps Script for Developers and Google Apps Script for Beginners.