+ Reply to Thread
Results 1 to 11 of 11

Auto populate packing list from separate worksheet

  1. #1
    Registered User
    Join Date
    02-17-2018
    Location
    Bowling Green, KY
    MS-Off Ver
    Office 2010
    Posts
    6

    Question Auto populate packing list from separate worksheet

    I'm trying to auto populate full rows of information when I select a certain location. On my main packing list, I have locations set up. If I select a city, it pulls the data from sheet 2 and plugs in the city's address, contact and phone number. I want it to also populate the packing information. This will include information from sheet 3. It will need to pull each person and their items they have ordered, over to the packing list. I have used the vlookup function and this will pull the first row of information but I can't figure out how to make it to pull any more. For instance, my first row equation looks like this: =VLOOKUP(H7,Locations2!A1:F7,2,TRUE). This will pull the name of the first person that matches the city on my packing list. But I can't get it to find all the people for this city. I have sample data in this worksheet that I uploaded.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Auto populate packing list from separate worksheet

    There is only one person per location, anyway, so even if it were the right formula, which it isn't, it would only pull one person's details through. VLOOKUP will only ever return the first match it finds.

    In order to simplify this (and anything else you want to do moving forward), I suggest you add a column to each of the location tables and give each client a unique customer code or number. When you have done that, post again and we'll show you how to do what you want.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-17-2018
    Location
    Bowling Green, KY
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Auto populate packing list from separate worksheet

    Ok I believe I have added what you requested. If not, then could you please explain what you are needing in a different way. I wasn't sure what to put in the additional column on the Location sheet but I did add unique numbers to the Locations2 sheet.
    Attached Files Attached Files

  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,929

    Re: Auto populate packing list from separate worksheet

    A few things are clouding the issue here...
    1. The sheets you refer to in the question, dont match the sheets in the sample file?
    2. you mention you want by location, but your sample file seems to pull customer name?
    3. You only give 1 sample answer, IF Sales Invoice is your required output? If that is all you want, then OK, if not, maybe show some extra sample anwers?

    Remember, you know exactly what you want, we have no clue at all
    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 Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Auto populate packing list from separate worksheet

    Sorry, I don't think I was quite clear. So, every customer must have a unique ID - this then makes matching across different tables much easier, as names are not always unique. So, let's say that you have given Cameron Cox the unique client ID of 1, this then means that this number will stay with him everywhere he appears: he will need 1 next to his record in either of the two location tables. ALL clients need a unique ID. Do you think you can do that before we proceed?

  6. #6
    Registered User
    Join Date
    02-17-2018
    Location
    Bowling Green, KY
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Auto populate packing list from separate worksheet

    Ok I hope I have updated as needed. I have changed a few things to hopefully make it easier to keep separate. I want 3 different things to change when I select the location from the highlighted drop down list.Attachment 561733 I have changed the tab from Location2 to Employees because thats what they are. These individual employees will place orders, and they will be shipped to certain locations in groups. I changed the tab from Sales Invoice to packing list (didn't realize it wasn't listed that way already).I added an ID column to the packing list since I believe AliGW said it will follow the customer where ever the record goes. Sorry for any confusion. I'm OK with excel but I'm just now really learning about functions. Before a few days ago I just understood how to get averages. I have added additional people to employees that have the same locations. And I intentionally left 2 people without any orders. When our large group places an order, they tend to send a list of about 500 people, but not all get things so there are times when several people have nothing next to their names. I hope this new worksheet helps.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Auto populate packing list from separate worksheet

    The column for the ID number may be populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The rest of the columns (after undoing the merge and center for Pins) are populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    02-17-2018
    Location
    Bowling Green, KY
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Auto populate packing list from separate worksheet

    Thank you for the response and help. For the most part, this is what I want. The only small issue is that it populates all the people who are listed for a city even if they haven't placed an order. Is there a way to filter out the ones who work at a location but didn't actually order anything? There are times when I get a list of 500 but only 100 ordered something so Id have 400 people not needing to be on the list.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Auto populate packing list from separate worksheet

    It may be that an employee who makes an order gets a T-shirt, if that is the case then the formula for ID could be modified to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If that isn't the case then an additional column, say column H, could be added to the Employees sheet that populates using: =OR(C2<>"",D2<>"",E2<>"",F2<>"")
    The ID formula on the Packing List sheet could populate using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  10. #10
    Registered User
    Join Date
    02-17-2018
    Location
    Bowling Green, KY
    MS-Off Ver
    Office 2010
    Posts
    6

    Re: Auto populate packing list from separate worksheet

    Ah Yes! This fixed it. Perfect. Thanks so much for all your help. Now I'm just trying to make myself understand what each part of the function does so that I can use this style in the future. I appreciate your help very much! The first new formula is what fixed it. Each person always orders a shirt. The other items are optional.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Auto populate packing list from separate worksheet

    You're Welcome and thank you for the feedback.
    As to understanding the formula, the first two arguments to the AGGREGATE function are SMALL (15) and Ignore error values (6). The * represents an intersection of two arrays, so what ever is true in both will result in a value of one and the rest will result in a value of 0. From there a good way to follow what the formula is doing is by using the Evaluate Formula feature found on the Formulas tab, however let us know if you have any questions.
    Also please take a moment to mark the thread as 'Solved' using the thread tools link above your first post.
    I hope that you have a blessed day.

+ 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. Auto-Populate Data From Master List to Separate Sheets When Two Criteria's Are Met
    By centibttrfly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2014, 11:18 AM
  2. Replies: 16
    Last Post: 12-23-2013, 12:04 AM
  3. Auto Populate separate sheets?
    By bigjimslim in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2013, 09:29 AM
  4. Replies: 6
    Last Post: 08-16-2012, 10:02 AM
  5. Replies: 3
    Last Post: 02-28-2012, 11:54 AM
  6. Auto populate data from multiple cells on separate worksheet
    By Talance in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2011, 07:19 PM
  7. Replies: 2
    Last Post: 08-04-2010, 07:36 PM
  8. Auto-populate receipt numbers from a separate worksheet
    By jsmithogslp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2010, 02:24 PM

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