Q:

Value from an IF Statement then SUM Excel

hopefully this is a quick fix.
I have two columns of data, column A1 already populated and column B2, which will be populated ad hoc, then based on whether there is data in either cell, carry out a calculation (E3*D3)then multiplied by the value of the cell either A1 or B2. 
So I am fine with the basic IF statements below, and can combine them using IF(OR, but I am stuck using an IF to look at B2 is it greater or less than A1, but doesn't equal 0, then use that value as part of a multiplication (E3*D3)*value ? 
Is this possible?
Examples 
=IF(B3=0,(SUM(E3*D3)*A3))
=IF(B2=A2,(SUM(E2*D2)*B2))

I hope I have made some form of sense, any help will be greatly appreciated. 
Cheers

A:

Try this out:
=IF(AND(B3<>0, B3<>A3), E3*D3*B3, E3*D3*A3)

