+ Reply to Thread
Results 1 to 7 of 7

Sum values from multiple drop down box selection

  1. #1
    Registered User
    Join Date
    08-20-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    4

    Lightbulb Sum values from multiple drop down box selection

    Hi All,

    I'm super new to excel (so apologies if this isn't explained 100%) but have been researching certain things to create a spreadsheet how I want it.

    I've used a VBA code I found online which allows me to select multiple options from a drop-down box and create a list within one cell.

    Please Login or Register  to view this content.
    I'm unable to share a screenshot of my specific table due to being work related however, I've attached a dummy worksheet with the same set up I've got.

    So the dropdown box has option 1, option 2, option 3, option 4, etc.
    The VBA code allows me to pick as many of those, with repetition.

    I've created a table with a corresponding price, for example, option 1 is worth $50, option 2 is work $70, option 3 is work $80.
    If i select option 1, 2 and 3, I want this to sum together in another cell to create a total, which would be $200 if those 3 options were selected.

    I've created a table with the source for the drop down, with the price in the cell next to each option.
    I've tried a VLookup, however this only gives me the price of the first option I had selected. Using the above example, it only gives me $50 as that's how much option 1 is worth, it doesn't add the 3 amounts together based on my selections.

    I'm hoping there's either something I can add into my VBA or a formula of some sort that works with the VBA code i've put in.

    Thank you in advance!
    Attached Files Attached Files
    Last edited by briahnna; 08-21-2019 at 12:26 AM.

  2. #2
    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: Sum values from multiple drop down box selection

    Hi, welcome to the forum

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html

    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

    Also, To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Registered User
    Join Date
    08-20-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    4

    Re: Sum values from multiple drop down box selection

    Hi,

    Sorry I was not aware of the rules, i will read them now!

    I've added a dummy worksheet now for reference, thanks!

  4. #4
    Registered User
    Join Date
    08-20-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    4

    Re: Sum values from multiple drop down box selection

    as attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-20-2019
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    4

    Re: Sum values from multiple drop down box selection

    Worked it out!

    Please Login or Register  to view this content.
    Had to change columns around, but it basically populates the cell 3 cells to the right of the populated one, with the pricing based on my table. :D

  6. #6
    Registered User
    Join Date
    09-20-2023
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    1

    Re: Sum values from multiple drop down box selection

    Hi

    I. New to forum and also newish at Excel. I have also created multi drop selection cells in a column (from code online). Wasn't sure if I needed to start a new thread.

    I am just wondering is it possible to create totals for the choices within those cells (for example if I have 100 cells in a column and want to know how many say Info). Not able to post spreadsheet from work.

    Many thanks (hopefully I worded this ok

  7. #7
    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: Sum values from multiple drop down box selection

    Quote Originally Posted by stephdlog View Post
    Hi...Wasn't sure if I needed to start a new thread....
    Yes you do

+ 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. Change the drop down values, based on selection in other columns(drop downs)
    By zeebee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2017, 01:16 PM
  2. [SOLVED] Get multiple columns of unique values based on cascading selection criteria (drop boxes)
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-06-2017, 07:34 PM
  3. [SOLVED] VBA Change Event, Move multiple rows based on drop down selection for multiple criteria
    By Webbers in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-02-2017, 11:51 AM
  4. [SOLVED] using SUMIFS and adding values based on multiple criteria based on selection from the drop
    By muheebrahman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2015, 12:55 AM
  5. Drop-down list values selection
    By haleakala17 in forum Access Tables & Databases
    Replies: 1
    Last Post: 09-30-2012, 09:17 AM
  6. Replies: 1
    Last Post: 08-23-2012, 07:38 PM
  7. [SOLVED] Displaying values after multiple drop down box selection
    By markl41 in forum Excel General
    Replies: 5
    Last Post: 05-18-2012, 12:22 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