+ Reply to Thread
Results 1 to 3 of 3

Macro to manually input which field (column) to autofilter on using an input prompt

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    oxford, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to manually input which field (column) to autofilter on using an input prompt

    Hi,

    I have a worksheet that shows me items & their delivery frequency - Items are in column A and weeks across the top. Each items row has an X in the corresponding week that it needs to be delivered.
    I'm trying to write a macro that copy's everything from a specific week into a new sheet, with the user inputting which week they require. I've sorted everything except the part where the user can input which weeks required. I found some code (below) that allowed the user to input the criteria of the auto filter - is there any way to do a similar thing except changing the field number - the criteria should always be X.

    Please Login or Register  to view this content.
    I hope this makes sense to someone!?

    THanks
    Barney.
    Last edited by rin; 06-21-2012 at 09:36 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to manually input which field (column) to autofilter on using an input prompt

    Why dont you attach a sample file which you are using along with this code?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    oxford, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to manually input which field (column) to autofilter on using an input prompt

    Hi - Thanks for looking, but I've worked it out...I thought I tried this yesterday and it didn't work, however I must have made some mistake as its working fine now. For Info, I used the below code - this enables users to select the column to filter on:

    Please Login or Register  to view this content.

+ Reply to Thread

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