+ Reply to Thread
Results 1 to 3 of 3

Copy rows subject to several cell values

  1. #1
    Registered User
    Join Date
    11-08-2007
    MS-Off Ver
    2021 Prof
    Posts
    84

    Red face Copy rows subject to several cell values

    Hi .. I have a worksheet that has included in seperate columns the date and several different venues. I want to copy entire rows to another sheet subject to the user entering in a seperate cell not part of the database two or three options for the venues .. and start and end date range.
    So far I can get one cell to dictate the sort venue and get a list based on that venue. Now I just want to offer two or more venues so the list include those too and a date range.... and also for it to work if only the dates or one venue is inserted..

    Almost as hard to explain as to do ....


    Any thought on a answer???

    Many thanks

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Copy rows subject to several cell values

    Use Advanced Filter with criteria. It will handle multiple criteria from single input for single column to many criteria for multiple columns.

    Excel Advanced Filter Introduction

    Excel Advanced Filter -- Complex Criteria

    Visit YouTube and search for videos on the topic if you need to see demonstrations.

    Advanced Filter can be automated with the use of VBA.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Contributor
    Join Date
    12-02-2004
    Location
    London
    Posts
    255

    Re: Copy rows subject to several cell values

    Are the 2 files attached the sort of thing you are trying to achieve?

    The database file contains the data for each day and the available venues on that date.

    The Query File, allows you to enter where the database file is stored (cell B1), the filename of the database (cell B2). The from and two dates you wish to query on (cells B4 and B5) and two options to select for the venue required (cells B6 and B7)

    The file uses a small piece of VBA to identify that you have changed the filename and path in cells B1 and B2 and makes use of MSQuery to pull the data from the database file using a parameter query. As the Query File has VBA and an MS Query, you will get two warning messages when opening this file 1) A VBA sucurity warning, if Excel has the default security warnings set and 2) a Query refresh warning (select Enable automatic refresh).

    Note in order for the query to work correctly the database cannot have blanks in any of the cells, therefore I have prepopulated all cells with n/a if they are blank.

    I think this is what you broadly wanted from your original posting.

    Regards

    Gary
    Attached Files Attached Files

+ 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