Using the values of Cells in if statements

I can very easily get the cells to carry out my function which is
if((C247)=(C249+C251),1,0)

But how do I get VB code to do the same function, I have written If statements but I cannot seem to get the values of the cells to act in the if statement. The comparing function and addition of cell values is more what I need?

Could anyone please help

[353 byte] By [Bishopkris40] at [2008-1-16]