Excel with Macro

by thanhhungqb
File type not supported

Sub fillCells() Dim i As Integer Dim max As Integer max = 5 Worksheets("buy").Range("E1").Value = "mapping" ' map product price For i = 2 To max Worksheets("buy").Range("E" & i).Formula = "=VLookup(A" & i & ", products!$A$2:$D$10, 4, False)" Next i Worksheets("buy").Range("D1").Value = "cost" ' Calculate for each product For i = 2 To max Worksheets("buy").Range("D" & i).Value = Worksheets("buy").Range("A" & i).Value * Worksheets("buy").Range("B" & i).Value * Worksheets("buy").Range("E" & i).Value Next i ' call product cost fill to sheet main Dim total As Integer total = 0 For i = 2 To max total = total + Worksheets("buy").Range("D" & i).Value Next i

image of username thanhhungqb Flag of Vietnam Ho Chi Minh , Vietnam

About Me

HTML, CSS, Javascript PHP, ASP, JSP XML Excel C/C++, Java, VB, .NET Scheme, Prolog, Lisp Assembly MS SQL, MySQL, Oracle OS: Linux, Windows Experience about data entry, data processing, and Excel. I'm a Software Developer with 8 years of development and testing experience. Expert in algorithm.

$ 15 USD/hr

136 reviews
5.7

Tags