I tried to calculate data from listbox2 into listbox1 using this code, but the result is not correct,
dim o as integer
for o=0 to Listbox1.Listcount -1
dim gg as integer
for gg= Listbox2.Listcount -1 DownTo 0
If Listbox1.cell(o,0)=Listbox2.cell(gg,0) then
dim ox as integer
for ox=0 to ListBox1.Listcount-1
dim total as double
total=total+CDbl(listbox2.cell(o,1))
listbox1.cell(o,1)=str(total)
next
end if
next
next
i am expecting the result are,
AW01 3
AW02 3
AW03 3
For o As Integer = 0 To Listbox1.LastRowIndex
For gg As Integer = 0 To Listbox2.LastRowIndex
If Listbox1.CellTextAt(o,0) = Listbox2.CellTextAt(gg,0) Then
Listbox1.CellTextAt(o,1) = Str(Listbox1.CellTextAt(o,1).ToDouble + Listbox2.CellTextAt(gg,1).ToDouble)
End If
Next
Next