'The information in the cell orderdata = 3;890;ID117;K¤¤3;890;ID117;K¤¤3;890;ID117;K¤¤3;890;ID117;K 'The information in lines (obviously lol): 3;890;ID117;K orderdata = rs("orderdata") For Each i In lines arrayTmp = split(i, ";") prdAryTmp = prdAryTmp & "%%" & arrayTmp(0) Next productArray = split(prdAryTmp, "%%") For Each i In lines col = Split(i,";") If UBound(col) > 0 Then 'if there are any products - go on If IsArray(col) Then 'if it's an array (lol obviously) If IsNumeric(col(1)) Then 'if the price is numeric For Each x In productArray If col(0) = x Then 'checks if the product is in the productArray antal = antal + 1 'if it is, then it just adds 1 to the quantity (how many items) End If Next summa = summa + (Cint(col(1))*antal) 'the totalprice of the product (singleprice*how many) t=t&"" t=t&""&antal&"" 'print out :: how many of the same product t=t&""&col(0)&"" 'print out :: products name t=t&""&col(1)&"" 'print out :: products price t=t&""&col(1)*antal&"" 'print out :: products totalprice t=t&"" End If End If End If End If Next