+ Reply to Thread
Results 1 to 12 of 12

Populate form using data from second sheet that can be filtered by location

  1. #1
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, Pa
    MS-Off Ver
    Excel 2010
    Posts
    4

    Populate form using data from second sheet that can be filtered by location

    Hi all,
    I am attempting to create an automated OSHA log for my company which populates information based upon a drop list. The information is all being added from a data dump from another software program so the information is provided as needed but I need to be able to sort and populate the format by facility and full company. I've attached a copy of what I'm trying to achieve. I can very easily get the full company one but sorting by facility isn't working well as the closest I can get in formatting provides me only the first record for that facility rather than all the needed records. In the attachment is an example of how the data is pulled currently without any filtering, what Im trying to accomplish is that the records in the table reflect the selection in drop list on the first tab. Any assistance would be greatly appreciated!Automated Osha Log.xlsx

  2. #2
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, Pa
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Populate form using data from second sheet that can be filtered by location

    I have gotten the information over that I need using vlookup but now I'm getting multiple copies of the same record. How can I pull all the records that fit the given drop list response?

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Populate form using data from second sheet that can be filtered by location

    I didn't look at your file.

    Sounds like you want something like this...

    Lookup with multiple instances of the lookup value
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Populate form using data from second sheet that can be filtered by location

    Hi and welcome to the forum

    Perhaps if you provided a few examples of your expected outcome?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    Sorting the drop down list in any order can be achieve by sorting the cells the drop down list is pulling from. It appears on the uploaded form you have deleted that section. I see that you put the values on the OSHA Form 300 that you are looking for. What I believe anyone will need is an example of what the data dump will look like. Remember to change the data but leave the headers the same. Also on your worksheet include a worksheet that you will paste that data into. Someone can easily write a macro to move the data over, save each form individually, and or even print them for each row worth of data based on that worksheet you dumped the data into. You will need to cell reference where you want each data under that header to go like you have done so far but for each form. I hope that helps.

  6. #6
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, Pa
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Populate form using data from second sheet that can be filtered by location

    Jesse,
    The tab the information is pulling from is called data file and the drop list is being pulled from the access file. I am not sure what other information you would be looking for?

    All,
    I've attached an updated file with the v-look up information.Automated Osha Log.xlsx

  7. #7
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    To sort the Establishments do this - On the tab "Addresses" sort column A in the order you want the establishes in.

    Here is what vlookup does it looks for a one thing if you will in a list and brings back data from the first time it makes a match from the column you tell it to bring back. This is why vlookup won't work for what you are trying to accomplish. However a more complex formula using index and match may be the solution. Unfortunately that is a bit beyond my current understanding. I will play around with it a bit more to try and find a solution otherwise someone else will have to help you if you are looking for a faster solution. I apologize.

    I have not given up yet though. Although I will be very busy for the next few days and will not be able to research. I hope someone responds back to help you as i know people here have the answer as this i a pretty simple solution I believe. I seen the solution in this forums today somewhere.

  8. #8
    Registered User
    Join Date
    04-21-2014
    Location
    Indiana, Pa
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Populate form using data from second sheet that can be filtered by location

    Jesse,
    Any help would be great. I am actually going on vacation so I won't be working on this till later next week so any help you can provide no matter the timeline would be great.

  9. #9
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    I am working on a macro for this as I do not know how to write the formula for this. I have messaged FDibbins for help asking if he can answer the question faster just in case it takes me longer than you can wait.

  10. #10
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    This macro will only complete the form OSHA Form 300. You have to select an establishment first before the macro will run. If you fail to do that it gives you a message telling you to chose one until you do. Sorry for the length. I am sure there is a way to shorten that repeatative part. I would love to know how if someone else wants to rewrite that part. Let me know if you want this macro to be modified or create a new macro to fill out the other forms. I will need an example of what you want to see for the other forms if so. Thanks.

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    Did this work for you?
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

  12. #12
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Populate form using data from second sheet that can be filtered by location

    Please mark the thread solved if this brought you the solution you desired and please give rep to those who helped. Thank you.

+ 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. Replies: 3
    Last Post: 02-20-2012, 04:32 PM
  2. Copy each filtered location by date to another sheet
    By Arshmaan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2011, 04:22 AM
  3. Replies: 3
    Last Post: 03-23-2010, 06:44 PM
  4. Need help with formula or macro to populate one sheet with data filtered from another
    By leveleyed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2010, 12:59 PM
  5. Populate combo box from filtered data
    By brodybear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2007, 04:52 PM

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