+ Reply to Thread
Results 1 to 10 of 10

lookup/filter data, update it and save it

  1. #1
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6

    lookup/filter data, update it and save it

    Hi Community,

    I'm busy with the following little project:

    Given is an input table in Excel. (input.xlsx)
    It contains following fields:
    ID, name, address, postal code, date_of_start (headings are in first row A1, A2, A3, A4, A5)
    This table has 300.000 records. (data start at row 2)

    I would like to create a new Excel File (lookup.xlsm) where I can filter the data in the original Excel-file. (filter based on name and address)
    In the filtered results, it has to be possible to change/update the value of "date_of_start" and that should be saved in the original table. (input.xlsx)

    => is such thing possible with Excel/VBA?

    I discovered the Excel Advanced Filter function, but my need is a little bit more complex than that I guess:
    - I need to have 2 files: one with the data (backend) and one with the search & update function (frontend).
    - the changes made in the frontend has to be saved in the backend.
    - The use of MS Access is not possible.

    Any advice how to manage this would be appreciated.

    (with Excel Advanced Filter, I nearly had what I wanted, but the problem is that when you use "copy to another location", you can't make changes in the filtered results, and that's what I need)
    Last edited by fre_; 05-31-2016 at 05:37 AM. Reason: spelling

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: lookup/filter data, update it and save it

    Please attach the sample workbook - the backend especially. Attach the front end so we know what you want it to look like.

    There is a function in Excel called MS-Query. It can read from almost any data source, including another Excel workbook. So you can use the "back end" as if it were a database file. I can help you with the steps for setting it up but it will make more sense if we both working with the same set of files.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6

    Re: lookup/filter data, update it and save it

    Hi,
    thank you for your reaction.
    I will look into MS Query.

    Meanwhile, I've made 2 test-files to work with in my dropbox (backend.xls and frontend.xls):
    https://www.dropbox.com/sh/3klscgv1w...2RqqLt1Ga?dl=0

    (I can't upload the files to this thread for some reason)

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: lookup/filter data, update it and save it

    I notice that you now have a requirement to write data back to the source file. I'll work on that piece later. I have to open the source file, find the records and update only those lines. Too bad Access is not an option. This is the kind of things databases do automatically without coding. There is a concept in quality management called "fitness for use:" the more you have to modify a product before you can use it, the lower quality it is. Access = no modifications, Excel = some coding required.

    Attached is a document that explains how you can connect to the back end using MS-Query. About the only thing I forgot to record was that somewhere in the process, it asks you where you want to return the data. It looks like you want it to start in Cell C8.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6

    Re: lookup/filter data, update it and save it

    Thank you very much for this detailed walkthrough.

    The reason why I said that MS Access is not an option is because MS Access is not installed on the PC of the person that has to use the excel Frontend file.
    Or can Excel save to a mdb-file without MS Access has to be installed on the same PC?
    In that case, I could consider using MS Access as backend if that would be easier to save the updated data.
    (I do have a license for my own PC).
    Last edited by fre_; 05-31-2016 at 02:53 PM.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: lookup/filter data, update it and save it

    Microsoft provides free, runtime only licenses for Access. They allow you to run already-developed queries, forms and reports. They won't let you modify or add tables, forms or reports, but you probably don't want the end user doing that anyway.

    The end user would have no problem doing data entry or running reports.

    Also, MS-Query works well with an Access back end without any kind of Access license installed.

    In answer to your question, it is possible to have Excel update MS-Access. I've done it, but I'm rusty; it's been about a decade for me. It will take some coding to develop the query. If you don't give the user a runtime Access front end, this would be the way to go; the Access part will take care of finding the correct records and updating them.

    You have a relatively good application for this. The ID is unique, and you know exactly what field you will be updating. This makes formulating and building a query string easier.

    What version of Access do you have?

  7. #7
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6

    Re: lookup/filter data, update it and save it

    Hi, thank you for this info.

    I'm using the 2010 version of Ms-Office.

  8. #8
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6

    Re: lookup/filter data, update it and save it

    Been busy a whole day looking for a solution but I came to the conclusion that I will have to use something like Access runtime.
    The filtering part is not that difficult using Excel only, but the part where the data has to be updated and saved is more difficult to handle without other tools.

    Thank you again for all the advice.

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,926

    Re: lookup/filter data, update it and save it

    Well, the MS-Query part isn't wasted. It works very well with MS-Access and no additional licenses are required. If you decide to use it with Access, I advise writing the query part in MS-Access with any "fixed" parameters in place. Anything you need to pass at runtime, set up on the MS-Query side.

    Also MS-Query won't work with Access queries that use UDF and a couple of Access-specific functions like NZ(). In the case of NZ() you can replace it with an iif statement.

    Databases are good for managing the data. Excel I good for reporting it.

  10. #10
    Registered User
    Join Date
    05-31-2016
    Location
    Brussels
    MS-Off Ver
    2010 & 2013
    Posts
    6
    Thank you for that advice. I will give it another try using that combination.
    If I could get it work without other tools, it would be great.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to Save and Update data to another worksheet using VBA
    By skhari in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2015, 11:25 AM
  2. [SOLVED] ComboBox Data Filter and UserForm Update
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-20-2015, 01:26 PM
  3. [SOLVED] VLookup Question - If i update the lookup table i do not want to update old data
    By mrabattoir in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-28-2014, 03:40 AM
  4. Update pivot tables based on source data filter
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 08:03 AM
  5. Replies: 0
    Last Post: 04-09-2012, 04:55 PM
  6. Save Update Data In Masterbook
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-15-2011, 09:12 AM
  7. Auto Update for Advanced Filter & Sort Data
    By limjian85 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2005, 08:02 AM

Tags for this Thread

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