+ Reply to Thread
Results 1 to 7 of 7

Combo box will not give me an actual number

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    holland
    MS-Off Ver
    2013
    Posts
    29

    Question Combo box will not give me an actual number

    He guys!

    I am making a questionaire in Excel and am using the comboboxes to make a rating. The ratings go from 1 to 12 and i assigned the outcomes to different cells. And though all numbers show up in the cells i assigned them to, i can't use them for anything in a formula. For example, if i try to sum them up =SUM(H13:H24), it will say 0 even though it should be 78. I need to use each rating since they are used in different options later.

    Probably an easy one, but i can't figure it out

    Thanks in advance!

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Combo box will not give me an actual number

    I assume you use variables to get the combobox values? Did you set the variables as a number instead of a string?
    Please click the * below if this helps

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    holland
    MS-Off Ver
    2013
    Posts
    29

    Re: Combo box will not give me an actual number

    I used the following code to make the combobox:

    Private Sub Workbook_open()

    With Sheet2.ComboBox1

    .AddItem "1"
    .AddItem "2"
    .AddItem "3"
    .AddItem "4"
    .AddItem "5"
    .AddItem "6"
    .AddItem "7"
    .AddItem "8"
    .AddItem "9"
    .AddItem "10"
    .AddItem "11"
    .AddItem "12"

    End With

    Maybe i did something wrong here?
    Besides that i just assigned the combobox to a cell. They still show 1,2..12 in the cells. but they seem useless.

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Combo box will not give me an actual number

    What's the format of the cell you've linked it to?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  5. #5
    Registered User
    Join Date
    09-08-2014
    Location
    -
    MS-Off Ver
    -
    Posts
    68

    Re: Combo box will not give me an actual number

    I'm not exactly an expert, but I just tried what you're talking about - when populating the combobox, I just used CDbl
    So
    Please Login or Register  to view this content.
    It worked fine for me - adding, multiplying, whatever numerically oriented functions I tried were fine.

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Combo box will not give me an actual number

    Dont put them in ""'s is easier

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,417

    Re: Combo box will not give me an actual number

    Try this:

    Please Login or Register  to view this content.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ 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. Replies: 9
    Last Post: 06-14-2013, 04:38 AM
  2. Replies: 0
    Last Post: 09-06-2012, 10:41 AM
  3. actual number
    By jtwork in forum Excel General
    Replies: 2
    Last Post: 06-14-2007, 10:31 AM
  4. Replies: 5
    Last Post: 09-07-2005, 03:05 PM
  5. Replies: 2
    Last Post: 06-03-2005, 07:05 AM

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