+ Reply to Thread
Results 1 to 4 of 4

Filter issue (I think)

  1. #1
    Registered User
    Join Date
    07-03-2006
    Posts
    3

    Question Filter issue (I think)

    I have a spreadsheet that has 365 rows (one for each day) detailing sales activity (4 columns). I want to be able to filter and display the last 14 days of data, each of the 14 days being a separate row displayed below the original 365 rows.

    The spreadsheet is manually updated each day.

    The "rolling" 14 rows will dynamically change each day.

    Possible?

    Thanks in advance.

    Mgalloway

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    Copy and paste this code into the ThisWorkbook object of the VBE. Then everytime the workbook is opened, Sheet1 will be autofiltered to display the last rolling 14 days.

    Please Login or Register  to view this content.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    Registered User
    Join Date
    07-03-2006
    Posts
    3
    I get the logic of the code, but don't understand your instructions. I am a medium level excel user at best. Can you dumb-down how to implement this code into the spreadsheet. I have no idea what "ThisWorkbook object of the VBE" means.

    Thanks.

  4. #4
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    No problem.
    1. Copy the code from the post above
    2. go to your workbook that you want to paste the code into
    3. Right click the excel icon next to the file menu item in the upper left hand corner of the screen and select "View Code"
    4. This opens the VBE (Visual Basic Editor) to the "This Workbook" object
    5. In the blank space towards the middle of the screen below the word "General" paste the copied code.

    That's it. The code will do the rest when the workbook is opened the next time.

+ 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