As I understand it (and I don't use google docs much), Google docs uses Javascript as its macro language. So, converting your VBA macro to something Google docs can use is as "simple" as converting the code from VBA to Javascript.

If you are familiar enough with each language, then you should be able to do it by hand.

An internet search for "VBA to Javscript" converter finds a couple of possible converters, but they seem expensive. I do not know how well they work, either.

Your code looks like a recorded macro. I searched for "google docs macro recorder" and could not find anything useful. I found a couple of generic macro recorders (again they look expensive), but I know nothing about them.

To sum up, if you are not already familiar with Javascript, then I think you are at the point of needing to learn enough Javascript to put the code into Google.