+ Reply to Thread
Results 1 to 12 of 12

Multi Selection drop down list with cost calculation

  1. #1
    Registered User
    Join Date
    06-25-2021
    Location
    Florida
    MS-Off Ver
    365
    Posts
    5

    Question Multi Selection drop down list with cost calculation

    Hi all!
    I am pushing the limits of my knowledge in trying to get a formula that will search for particular items that have been selected from a multi selection drop down list and calculate the cost associated with those selected.

    I have come up with a formula that works, however, I don't know how to condense it correctly, if possible, so I don't exceed the character limits when I add all the items that are possible.

    I have posted a brief sample worksheet that shows what I'm talking about. However, I didn't add the multi selection box in the sample (I just used the wording that would show up).

    In the sample, Cell B4 is the actual item selected. In D4 it lists any accessories or modifications that is added or changed to the item in B4. D4 is the multi selection drop down list as more than one change can be made to the item. In cell E4 I need a formula that can search D4 and calculate the cost based on the prices listed (in this case) lower on the sheet. In my actual workbook, the price list is on a separate sheet within the same file.

    Right now I am using the following formula in cell E4:
    =IF(ISNUMBER(SEARCH(A19,D4)),(F19)*C4+IF(ISNUMBER(SEARCH(A20,D4)),(F20)*C4+...

    This works great as long as I don't have a long list of accessories or modifications. However, I have 18 different ones, at this time, on the actual file and the formula is too long. Anyone have any options or tricks to make this work? I think this is my last hurdle to finish this particular project, which I will be proud of when I'm done.
    Thanks in advance for any guidance or direction you can provide!!
    Lena
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Multi Selection drop down list with cost calculation

    Try

    =SUMPRODUCT(($F$19:$F$21)*(ISNUMBER(SEARCH($A$19:$A$21,D4)))*C4)

    I added another Accessory for testing.

    For what it is worth, I would not encourage you to put the accessory list in a single cell: it is not good practice.

    You will need a formula for each quantity if there are variable quantities for given accessories for a product
    Attached Files Attached Files
    Last edited by JohnTopley; 09-30-2021 at 02:46 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    06-25-2021
    Location
    Florida
    MS-Off Ver
    365
    Posts
    5

    Re: Multi Selection drop down list with cost calculation

    Thank you for the information. My issue is I need to be able to clarify which item gets what changes. I have seen a "Popup" list box with the option to check boxes of desired changes before. Is that a possibility?
    I don't know what the technical name for that is if it is possible. Any direction would be greatly appreciated. Thanks again

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Multi Selection drop down list with cost calculation

    Please post a file with examples of what you describe in your last post: it sounds like a VBA form

  5. #5
    Registered User
    Join Date
    06-25-2021
    Location
    Florida
    MS-Off Ver
    365
    Posts
    5

    Re: Multi Selection drop down list with cost calculation

    After some research and "playing" with the form I am trying to create, I have gotten a little further than when I first asked this question. I have attached a snippet of the form I am creating and how it works in the actual file now. My question is once the user selects the "modifications" they want for each item, I would like to add code that would find the "true" selections and sum the price(s) of those selections in an adjacent cell.
    Let me explain the process:
    The user puts in an item and then the quantity. If the user tabs or clicks on the modification cell the user form automatically opens. The user can then select the options and click apply or cancel out of the form.
    At this point, when the user selects the modifications and clicks apply, the "mod code" for each is posted to the active cell with a comma between each "mod code".
    I have found the "offset" code and feel that is going to be part of my resolution, but I am having trouble putting it together correctly with sum.
    Any help would be greatly appreciated. Thanks in advance!
    Lena
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Multi Selection drop down list with cost calculation

    Why not add code into the "Apply" button code to calculate the mod price as you have the data available?

  7. #7
    Registered User
    Join Date
    06-25-2021
    Location
    Florida
    MS-Off Ver
    365
    Posts
    5

    Re: Multi Selection drop down list with cost calculation

    That's where I fall short. I'm not having any luck setting up the correct code to the apply button.
    The code I am using to record the selected mods in the active cell is below.

    Myvar = ""

    For x = 0 To Me.Access_Mods.ListCount - 1
    If Me.Access_Mods.Selected(x) Then
    If myvar = "" Then
    myvar = Me.Access_Mods.List(x, 0)
    Else
    myvar = myvar & ", " & Me.Access_Mods.List(x, 0)
    End If

    End If
    Next x

    'place selections in worksheet into current active cell'
    Worksheets("sheet1").Activate
    ActiveCell.Value = myvar


    I am assuming I need to have a code similar as the sum would only be calculated if the mod is selected, but I just can't get it to work out.

    I am also assuming I would use a similar code using "offset" to get the total price to be documented in a certain cell.

    Thanks for any help you would provide!
    Lena

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Multi Selection drop down list with cost calculation

    Try

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 11-03-2021 at 07:15 AM.

  9. #9
    Registered User
    Join Date
    06-25-2021
    Location
    Florida
    MS-Off Ver
    365
    Posts
    5

    [SOLVED] Re: Multi Selection drop down list with cost calculation

    That is perfect! I would never have gotten that. I was trying to use regular formula language instead.
    However, this has peaked my interest and am looking forward to actually learning VBA coding.

    Thank you soooo much for your help! You have been great!!
    Lena
    Last edited by lovnlife; 11-03-2021 at 12:49 PM. Reason: issue solved

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Multi Selection drop down list with cost calculation

    You are very welcome.

    Re VBA: there are numerous (free) tutorials on VBA on the Internet to get you started.

    Please go to "Thread Tools" and mark as "Solved". Thank you.
    Last edited by JohnTopley; 11-03-2021 at 02:23 PM.

  11. #11
    Registered User
    Join Date
    01-17-2024
    Location
    Dallas, Texas
    MS-Off Ver
    2021
    Posts
    1

    Re: Multi Selection drop down list with cost calculation

    Was this ever solved? I am having the same issue. I have a table of costs by service as well as a multiple selection dropdown. I need it to sum the total cost based on what is selected in the dropdown.

  12. #12
    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: Multi Selection drop down list with cost calculation

    Quote Originally Posted by weis View Post
    Was this ever solved? I am having the same issue. I have a table of costs by service as well as a multiple selection dropdown. I need it to sum the total cost based on what is selected in the dropdown.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #1 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    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

+ 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. [SOLVED] Do I need a VBA to do this? Dependent Drop Down with multi selection and check boxes?
    By Stev0 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-16-2019, 05:33 PM
  2. Replies: 3
    Last Post: 10-03-2019, 04:13 PM
  3. Filter columns based of drop down/multi selection
    By cessary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2019, 04:53 PM
  4. [SOLVED] Trying to work out a Multi Selection Cost calculator
    By robiton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-15-2015, 08:23 AM
  5. Program for Multi selection in a drop down box
    By lonleysoul in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2014, 09:17 AM
  6. Cost total based off of selection on drop-down menu
    By dreamsteve in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2014, 05:12 PM
  7. [SOLVED] multi drop down list with multi-lookup
    By civileng12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2012, 06:50 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