its perfect btw using this coding will result in the total cost of items more than budget. so i came up with this "sheet2.cells(i+2,cellloop).delete" to delete the last item. however, it is not working. do u know what is wrong?