macro to hide columns

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My spreadsheet has data in cells A1:G20. I would like to create a macro to
hide columns D, E, F&G. Similarly, I would like to create a macro to unhide
the same columns. I appretiate your help with code to do this.
 
Try

ActiveSheet.Range("D1:G1").EntireColumn.Hidden = True

Set it to false to unhide them
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top