+ Reply to Thread
Results 1 to 36 of 36

I want to make a packing slip with macro enabled drop downs in the Item # column.

  1. #1
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    I want to make a packing slip with macro enabled drop downs in the Item # column.

    I would like to make a Packing Slip, with a drop down in the Item# column.
    When an item is selected i would like the corresponding description and part quantities to be inserted...
    I have tried a code as below...
    Please Login or Register  to view this content.
    This works great for cell A20, but i need it to do the same in all 'A' cells from A20 - A45
    I also wondered about a code such as... but dont understand it and cant get it to work...
    Please Login or Register  to view this content.
    I am very sorry about my poor VBA terminology, but if anyone could help me with one of these codes, or anything else that may work that would be great...
    I have attached the spreadsheet i have so far if it is of any use...
    Copy 2 of Packing Slip.xlsm
    Please help me...

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    You could have all the info for all the cars on one sheet.
    Then do just the search for part number.
    WOuld be much easier.

  3. #3
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    OK, if i do that, how do i set up the search? And how do i get it to copy and paste the info into the packing slip?

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    I'm working on it

  5. #5
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Hey, thanks a lot...

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    I have a little problem. I'll fix it and get back to you. Don't know why

  7. #7
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    i suppose you dont know how long it will take??

  8. #8
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    do you think you will be back to me today?

  9. #9
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913
    I'll get back to you in the morning :-)

  10. #10
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Ok I hope some1 can help me so I keep 1 line for copy/paste so we don't have to use With in the code.
    Attached Files Attached Files

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Put this formula in B20, then copy down. No VBA is needed, is it?

    =IF($A20="","",VLOOKUP($A20, List!$A:$B,2,0))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  12. #12
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    If not then use this code it works:
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Oh.... I never think about the forumlas I was never quite good with them

  14. #14
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Sorry for the slow response... i was away yesterday.
    Thank you for the help... both options work to a point...
    one thing further that i need is to include the lines underneath a part number which are included in that part numbers equipment...
    there is not always extra lines but only for certain part numbers...
    In other words, if a certain part number needs a set of bolts and a sill plate, i want that included in the Packing Slip as well.?
    I have attached a spreadsheet to more easily explain what i am speaking about...
    2nd Try....xlsm
    The green lines in Sheet 1 are single items and have no additional parts...
    The red lines have additional parts included, and i have marked those additional lines blue...
    So i need exactly what you have done for me, except when i pick a red item number, i need it to pull the red line, as well as all corresponding blue lines for that part number...
    Again thanks so much for your help so far...
    I added to your rep as that was awesome help...
    Hopefully this makes sense...
    Last edited by Legend Rubber; 10-04-2012 at 11:17 AM.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    I don't see the new sheet?

  16. #16
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    2nd Try....xlsm
    Sorry about that...

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    1) On your SHEET1, put blank rows above and below any items that are colored red and multi-rowed items. This will make it easier for the COPY command to just copy the "currentregion" of that item code, the blank rows above and below cut them off from the other items.

    2) Then this macro will do the job:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  18. #18
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Thanks alot...
    One thing i forgot to mention... the blue lines have quantities that are individually dependent on the number put in the red line quantities... so quantity of 3 in a red line item may require 8 bolts, 7 joiners, etc...
    There is already currently a formula in these blue rows... how do i transfer that to the packing slip?
    Do you mind if i ask you a few more things after you solve this in relation to this sheet?

    Also, how do i make it so the font type is always the same when this code runs?

  19. #19
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    I was transfering the "formulas" because you had preformatted your FORM with bands of color. If we start pasting colors that banding would be messed up.

    If you're will to just eliminate those bands, then it's a simple tweak:

    Please Login or Register  to view this content.

  20. #20
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    So I'm guessing problem fixed?

  21. #21
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Color bands can be deleted that shouldn't be a problem...
    One other thing, when you delete the drop down option, it deletes any preselected text in the adjacent column B,C and D, but not the
    "extra parts" if there are any...
    So in other words, if i add in a part that has additional parts, then delete that part, i want all the info i just entered to disappear.
    If i add a part in A1 that has 2 additional parts... B1,B2,B3 & C1,C2,C3 & D1,D2,D3 all have text copied into them. if i then erase the option in A1, currently only A1, B1, C1, & D1 are emptied...
    Let me know if this makes sense...
    Also at the same time if you know a way to make Auto Complete on the drop down list so i don't have to scroll through all the part numbers that would be great...
    Here is what i have done so far... little changes, but so far working great...
    3rd Try....xlsm
    Last edited by Legend Rubber; 10-05-2012 at 07:24 AM. Reason: Added Updated Spreadsheet

  22. #22
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Yeah, sorry, I'm not going to do that. Most instances you will add the correct part. When you don't, you can clear all the rows you need to.

    My design tip of the day would be that even those child rows that are being added should actually have a "code" that gets added automatically in the first column, too. That would make it obvious to the user those code would need to be deleted as well.


    There is no AutoComplete capability in a drop down data validation list. That is a feature of ComboBoxes were you to learn to build an actual FORM, not just a sheet-based form-like tool.
    Last edited by JBeaucaire; 10-05-2012 at 11:07 AM.

  23. #23
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Very good idea... how would i get the "child codes" to be pasted as well...?

  24. #24
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    1) Go back to your original list and put in the child codes in the same column.
    I would recommend you make sure these codes are unique to each group, a little chaos might ensue if you start using the same code(s) multiple times. The point is to not have the column A values be blank.

    2) Updated code:
    Please Login or Register  to view this content.

  25. #25
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    That code doesnt work... it pushes everything over...

  26. #26
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    It works fine in my test on your sheet.

    http://screencast.com/t/FrJ6TJxuWS0s


    I've added a line of code to correct the borders.
    Please Login or Register  to view this content.

  27. #27
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    That is fine, but if i add a subcode for the blue "child" lines, it doesnt copy those...?

  28. #28
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    The picture in p0st #26 shows the existing code is already copying in those blue child lines.

  29. #29
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    i see that, so then what are you suggesting that i do to make it obvious that those are part of the red lines?
    I thought you meant add a "sub" part number in column A... but column A for the blue lines doesn't copy...
    Sorry if i am confusing myself...
    On a second note... i saw on a separate post/one of your websites an idea you had for a sort of category dynamic data validation that allowed you to narrow down the part numbers by category... do you think that would work in this type of application?

  30. #30
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Your application is about automatically transferring row(s) of information immediately upon the selection from a primary drop down list. The page you're referring to on my site is about have secondary drop downs with secondary options based off of the initial selection. It doesn't automatically transfer choices. So, I'd say it's not the same thing.

    But you ask if it's usable? Of course, depends on what you change about the way your sheet is to be operated by users.

    ==============

    Yes, I was indicating you should put child part numbers in column A, and that those child part numbers be "unique". Those cells would be copied as well with the updated version from post #24, but I see I forgot to keep that update when i added something in post #26. My bad.

    Here is the correct version that includes all:
    Please Login or Register  to view this content.

  31. #31
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    i am sorry i am making a big hassle for you...
    The code works great, but it erases the DV from all lines when it copies the "child" part numbers... then if i go back to enter a diff part number there is no DV...

    ================

    As to the other... it is only going to be a packing slip, i am just trying to make it as user friendly/easy as possible... if you have any ideas i would be appreciative...

  32. #32
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Please Login or Register  to view this content.

  33. #33
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    That worked to a point, but the offsets were off on any of the parts that didnt have "children"... i seem to have fixed that with this code, but now none of the formula in column C of the "children" work...?

    Please Login or Register  to view this content.
    Let me know if i am missing something...

  34. #34
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    No, I just didn't keep it all straight in my head that you want the "formatting" to be kept during to the copying, I don't do this kind of thing at all, typically, so I forget.

    One more try, this should do it, and not blow away the validation:
    Please Login or Register  to view this content.

  35. #35
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Awesome, that works great, only problem was that it didnt copy across the formulas for calulating the qntys of the "child" parts...
    I added the following lines... the second one may be useless but... i also changed the final Target.Offset's to 1 to make things a bit easier...

    Please Login or Register  to view this content.
    Again, thanks for all your help, i will get something in the mail for you.

    Are you annoyed with me yet, or can i ask you some more questions that help make my life easier?

  36. #36
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: I want to make a packing slip with macro enabled drop downs in the Item # column.

    Not annoyed at all. I help to learn myself, so it's all good.

    If that resolves the question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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