# IF formula won't work!

#### fidgen

##### New Member
what is wrong with this? I've switched brackets around and done all sorts, but I'm banging my head now!

=IF((AVERAGE(DataRev!B2:B32))=0,#N/A,IF(Movements!\$D2)=0,#N/A,(AVERAGE(DataRev!B2:B32))*Movements!\$D2)

I bet its something so **** simple!

cheers
Hugh

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
To fix
remove the close bracket from (movements!\$d2)=0
to say ,if(movements!\$d2=0,..........
hope this works for you

stuart

thanks - is working now!

On 2002-09-20 03:12, fidgen wrote:
what is wrong with this? I've switched brackets around and done all sorts, but I'm banging my head now!

=IF((AVERAGE(DataRev!B2:B32))=0,#N/A,IF(Movements!\$D2)=0,#N/A,(AVERAGE(DataRev!B2:B32))*Movements!\$D2)

I bet its something so **** simple!

cheers
Hugh

=IF((AVERAGE(DataRev!B2:B32))=0,#N/A,IF(Movements!\$D2)=0,#N/A,(AVERAGE(DataRev!B2:B32))*Movements!\$D2)

Why not simply...

=AVERAGE(DataRev!B2:B32)*Movements!\$D2

which would give either a non-zero or zero result?

If you rather see #N/A as result when one of the terms is 0, then

=IF(SETV(AVERAGE(DataRev!B2:B32)*Movements!\$D2),GETV(),#N/A)

http://longre.free.fr/english/index.html

Replies
6
Views
375
Replies
8
Views
1K
Replies
15
Views
948
Replies
2
Views
517
Replies
0
Views
319

1,217,356
Messages
6,136,078
Members
449,988
Latest member
Mabbas

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back