Results 1 to 8 of 8

Hide non ajacent colums with a Macro

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Halstead
    MS-Off Ver
    Excel 365
    Posts
    240

    Hide non ajacent colums with a Macro

    I am trying to hide non adjacent columns in a spreadsheet with a macro, I can select the columns no problem and hide them but when I assign the macro I have recorded to a button it hides all the colums between the ones I have selected as well.

    Does anyone no what I am doing wrong and how to fix it.

    The Macro I have recorded is

    Sub Hide_all()
    '
    ' Hide_all Macro
    '

    '
    Range("N:N,K:N,C:C").Select
    Range("C1").Activate
    Selection.EntireColumn.Hidden = True
    ActiveWindow.SmallScroll ToRight:=-2
    End Sub
    Last edited by Shazz; 02-01-2013 at 10:40 AM. Reason: Solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1