Hello all,
I am using a Do While loop in order to add up values in a column up to a certain point. Problem is, when checking what numbers the loop has stored, it only shows a value of 0, which in turn gives me a "divisible by 0" error down the line when I have to plug in said values in my formula. I have declared the variables as LONG in my macro.
Let me know if you need any further information. Any help would be massively appreciated. Thank you!
Do While Sheets("Data").Cells(7 + c, 4) <> "" VPL = VPL + Cells(7 + c, 10) MARKUP = MARKUP + Cells(7 + c, 14) c = c + 1 Loop
Last edited by farzyness; 12-16-2010 at 09:44 AM.
Hi,
Try adding a ".Value" after your Cells(...) statements and see if that helps.
IE instead of Cells(...), make it Cells(...).Value
hth.
One test is worth a thousand opinions.
Click the * below to say thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks