+ Reply to Thread
Results 1 to 13 of 13

creating a drop down list for names and addresses

  1. #1
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    Thanks to all the people who posted in this thread, your info allowed me to create my drop down lists with addresses. However I need to find out how to go one step further.
    I'm writing a purchase order entry form for my company. I've used the above formulas to create drop down lists with addresses for each of our stores and vendors, but I need form to automatically select the correct "ship to:" location. Some stores will always have merchandise shipped to the store regardless of the vendor. Other stores will always have the product shipped to a warehouse location, but in a few stores the product will be shipped either to the store or a warehouse depending on the vendor.
    I've been able to work out the formulas for the stores that have shipments always to one location by creating a second address table and linking the selected store to it.

    Here is basically what I need:

    Store A + Vendor A = Store A
    Store A + Vendor B = Store A
    Store B + Vendor A = Warehouse
    Store B + Vendor B = Store B
    Store C + Vendor A = Warehouse
    Store C + Vendor B = Warehouse


    Is there any way to do this?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    You can use a VLOOKUP formula concatenating the two criteria fields.

    e.g.

    =VLOOKUP(A1 & " + " & B1,G:H,2,0)
    Martin

  3. #3
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    I don't think I was clear. I'm not looking to display and actual '+' sign, but more like an "if 'a' and 'b' then 'c'" The user will select a value (e.g. store location) from the drop down list in say cell a1 and select another value (e.g. vendor) from another drop down list in cell b2. The form will generate a value (e.g. shipping location) in a 3rd cell.
    If what you posted will do that, then I am confused about the formula you posted.

  4. #4
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    Here's a example of what I need. I hope the upload works
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day flmoose,

    How many combo of shipment do you require. If more than 7, we'll have to go with plan B.

    Hope this helps
    Attached Files Attached Files
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Please see the attachment showing how the formula works.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    ratcat,

    It looks like that's what I need, but I need it to change the ship to addresses as well. What would be the best way to accomplish that?
    I have 6 stores (inc. 1 warehouse) and 5 vendors.

  8. #8
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day flmoose,

    Do you need more help with the formula ?

    If so, what is the combo requirements ?

    I've got a feel with the 6 stores (inc. 1 warehouse) and 5 vendors involved that we have to go with mrice solution (Plan B). If you need help with that, I'm more that too happy to help.

    Cheers

  9. #9
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    ratcat,

    Oh yeah! Help is needed.
    Using the workbook you posted, I was able to see how you set up the arguments and emulated them as best I could substituting the information I need.

    IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Bradenton - 500",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Dale Mabry - 900",A7="A-1 Superior, Inc.",Addresses!B8)(A1="Hillsborough - 100",Addresses!B8,IF(A1="Hudson - 700",Addresses!B5,IF(A1="Clearwater - 300","addresses!b3",""))))

    However, Excel says the function is too large and directed me to the formula ar for help. A window popped up and I entered the firsdt argument, but still it is too large.

    What is this mrice you are speaking of?

    BTW- Addresses!b8 is a cell I added with the warehouse address. I left a row between it and the stores because I do not want it to show on the drop down list.

  10. #10
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day flmoose,

    You formula

    IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Bradenton - 500",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Dale Mabry - 900",A7="A-1 Superior, Inc.",Addresses!B8)(A1="Hillsborough - 100",Addresses!B8,IF(A1="Hudson - 700",Addresses!B5,IF(A1="Clearwater - 300","addresses!b3",""))))


    In the code that you supplied, the argument have not been satified.

    Eg
    IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc.",Addresses!B8),IF(........


    It should read for starter,

    IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc."),Addresses!B8,IF(...

    Argument not closed correctly

    Remember more than 7 arguments the computer will beep at you.

    mrice solution is about listing all the combo then using the vlookup formula it will find the result.

    On the blank sheet
    eg In the A col list all your stores then B col list all the vendors then in C col list the delivery point (Shipment) combo.

    Then the vlookup formula will look in col A and col B and return the result in col C.

    Cheers

  11. #11
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Quote Originally Posted by flmoose
    IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Bradenton - 500",A7="A-1 Superior, Inc.",Addresses!B8),IF(A1="Dale Mabry - 900",A7="A-1 Superior, Inc.",Addresses!B8)(A1="Hillsborough - 100",Addresses!B8,IF(A1="Hudson - 700",Addresses!B5,IF(A1="Clearwater - 300","addresses!b3",""))))
    Corrected the whole formula *I think* just about when cross eye. lol

    Try this

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    05-24-2008
    Posts
    12
    Quote Originally Posted by ratcat
    Corrected the whole formula *I think* just about when cross eye. lol

    Try this

    Please Login or Register  to view this content.
    You must've gotten a little cross-eyed. Iguess it's getting late there. You missed a ( but I found it. I also had to add a couple arguments I forgot, but it all seems to work now!
    Yeah! Here's what I ened with:


    =IF(AND(A1="Clearwater - 300",A7="A-1 Superior, Inc."),Addresses!B8,IF(AND(A1="Bradenton - 500",A7="A-1 Superior, Inc."),Addresses!B8,IF(AND(A1="Dale Mabry - 900",A7="A-1 Superior, Inc."),Addresses!B8,IF(A1="Hillsborough - 100",Addresses!B8,IF(A1="Hudson - 700",Addresses!B5,IF(A1="Clearwater - 300",Addresses!B3,IF(A1="Bradenton - 500",Addresses!B4,IF(A1="Dale Mabry - 900",Addresses!B6))))))))

    Thanks you SO much for all your help!

  13. #13
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Cool !!!!

    and well done ! I'm more than cross eye now *looks a clock* %$#! 1:55am.

    Thanks for the feedback.

    and Goodnight or good morning ??? LOL


    Cheers

    PS I think mrice solution was a handy solution has well. Thanks for the input

+ 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