Results 1 to 2 of 2

Show / Hide columns

Threaded View

DBenson1968 Show / Hide columns 06-05-2014, 05:19 PM
alansidman Re: Show / Hide columns 06-05-2014, 05:27 PM
  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    Doncaster
    MS-Off Ver
    Excel 2013
    Posts
    14

    Show / Hide columns

    I have recorded 2 macros on my worksheet one to show my values in dollars and one to show it in pounds. I have these values in separate columns and thought I could just hide the pound column when I click on the dollar button (with macro attached) and vice versa. The problem is that it seems to hide all columns and not just the ones I selected while recording.

    
    
    Sub Pound_Expenditure()
    '
    ' Pound_Expenditure Macro
    '
    
    '
        Columns("A:H").Select
        Selection.EntireColumn.Hidden = False
        Columns("D:D").Select
        Selection.EntireColumn.Hidden = True
        Columns("H:H").Select
        Selection.EntireColumn.Hidden = True
        Range("J9").Select
    End Sub
    This is the macro code, any help would be great.
    Last edited by DBenson1968; 06-05-2014 at 05:50 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel 2008 : Hide/show columns
    By Didieeer in forum Excel General
    Replies: 1
    Last Post: 02-02-2012, 07:36 AM
  2. Hide Show columns
    By Glio in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2007, 06:10 AM
  3. how can hide and show columns using macro?
    By Hoshyar in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  4. how can hide and show columns using macro?
    By Hoshyar in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. [SOLVED] Show/Hide Columns
    By StephanieH in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-24-2005, 10:05 AM

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