I'm trying to write an excel macro that does a simple calculation using values in existing cells and outputs a value. I basically want to write a formula that takes column a and column b and does the following operation (b/(a+b)) and puts the answer in column c. This needs to be done for rows 1 through 4. I do not have a lot of programming experience so Im not exactly sure where to begin. If someone could let me know which commands and or processes i need to write this macro.
Dim i As Integer
i = 1
Do While Cells(i, 1).Value <> ""
Cells(i, 3).Value = Cells(i, 1).Value / (Cells(i, 2).Value + Cells(i, 1).Value)
i = i + 1
Loop
(a/a+b)
. Otherwise, this looks like it should work. What seems to be the problem? – David Zemens Apr 1 at 19:25