This is not a macro, but ... might this be what you're looking to
accomplish?
Open a new sheet, and select *all* of Column G by clicking on G in the
column header.
Then, do <Ctrl> <Shift> <RightArrow>.
This selects all the columns, out to the last column, IV.
Right click in the selection and choose "Hide".
Is that the effect you're looking for?
If it is, you can do the same thing with the rows, by simply using the down
arrow in place of the right arrow.