Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The user chooses from a combo box and it then fills a list box with 6 colomns
that correlate to the combo box. My question is how do i write a formula to sum the value that show up in column 4 (percent of ratio) in the listbox. Here is the code that i use to fill the listbox. i want the sum total to show up in a lable1 when the combo box is loaded. Private Sub LoadData() With lstData ..Clear Ration = cboRation.Value For index = 2 To source.Rows.Count If Ration = source.Cells(index, 6) Then .AddItem source.Cells(index, 1) 'id .List(.ListCount - 1, 2) = source.Cells(index, eBoxes.Date1) .List(.ListCount - 1, 3) = source.Cells(index, eBoxes.Ingredient) .List(.ListCount - 1, 4) = source.Cells(index, eBoxes.Percent_of_ration) .List(.ListCount - 1, 5) = source.Cells(index, eBoxes.Ration_ID) .List(.ListCount - 1, 6) = source.Cells(index, eBoxes.Pounds) End If Next End With End Sub -- Thank you, Jennifer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listbox Values | Excel Discussion (Misc queries) | |||
Values from a ListBox | Excel Programming | |||
Fill values into a listbox matching selected values from a combobox | Excel Programming | |||
Compare Listbox values with Collection values | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |