+ Reply to Thread
Results 1 to 6 of 6

ListBox Userform (Sum, total and calculating)

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    ListBox Userform (Sum, total and calculating)

    Hi guys,

    I am stuck with this listbox to calculate the total as per the amount entered in a combobox1.

    1) I want the result to be listed in the 3rd column of the listbox.
    2) If the total in the listbox does not match with the combobox, because of the rounding problem, then the difference will be added to the 1st row of the listbox.

    Here is the sample that I was stuck in:
    calculate.xlsm

    Hope anyone can help.

    Thanks.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: ListBox Userform (Sum, total and calculating)

    Change the definition of the named range test to A1:C9, and try

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: ListBox Userform (Sum, total and calculating)

    Hi,

    For this sample, I use a define name for it. However, the combobox populate the listing from a mastersheet containing a lot of data. I cannot set the range to active sheet.

    Is there a way to get the amount directly from listbox and calculate from there??

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: ListBox Userform (Sum, total and calculating)

    No, because you bound the object, you have to work on the range.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: ListBox Userform (Sum, total and calculating)

    Then will it be possible to not list them in the listbox but have show the result in a message box instead? I did it for the last row but i dont have any clue to show for each available row.

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: ListBox Userform (Sum, total and calculating)

    Ohh i figure it out... Instead of using the same listbox, i added a new listbox right beside so i have all new data to control it. Then some manipulation with variable and i got to it.


+ 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. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  2. userform listbox
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2013, 11:09 PM
  3. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  4. Populate userform listbox based on value selected in another listbox
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2012, 05:16 PM
  5. Replies: 1
    Last Post: 05-17-2006, 04:50 PM

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