+ Reply to Thread
Results 1 to 3 of 3

Help with AdvancedFilter macro

  1. #1
    Registered User
    Join Date
    07-08-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Help with AdvancedFilter macro

    Hello all,

    I was wondering if anyone could help me solve an issue I'm having with creating a macro to filter some data from one sheet to another. I used the "record a macro" function to get the code I've posted below but part of the code is always changing.

    In my workbook I have a main sheet called "Data" and another sheet called "Parts". The code below does what I need it to do, but the problem is that the cell range (A2:I139) is not constant and may change depending on how many rows of information I import on the "Data" sheet.

    What I'd like to have happen is either have a dialog box pop up and prompt me to select the cell range (I've tried using the Application.InputBox function but can't figure it out), or since the first cell will always be A2 and the last column will always be I, have excel automatically figure out the last row that contains data.

    Thanks for any and all help offered.

    Mark

    Please Login or Register  to view this content.
    Last edited by Mark I; 07-09-2009 at 09:47 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Help with AdvancedFilter macro

    Try this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-08-2009
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Help with AdvancedFilter macro

    Thank you so much, that worked like a charm. Guess I need to study the basics of defining and using variables.

+ 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