# IF next cell > 0 then display results for this cell

#### ianfav

##### New Member
Hi,
This is probably an easy one but for some reason I am unable to get the syntax correct. I have a formula that checks worksheets for a specific value in a column between certain rows. If the value is true then count as per below:

=COUNTIF('1 MMM-YY'!E8:E29,"SET")+COUNTIF('2 MMM-YY'!E8:E29,"SET")+COUNTIF('3 MMM-YY'!E8:E29,"SET")+COUNTIF('4 MMM-YY'!E8:E29,"SET")+COUNTIF('5 MMM-YY'!E8:E29,"SET")+COUNTIF('6 MMM-YY'!E8:E29,"SET")+COUNTIF('7 MMM-YY'!E8:E29,"SET")

The results from this formula are computed to a cell in a Summary worksheet, this formula works fine but my problem is that I want to only display the results in this cell when the cell next to it has a value >0.

### Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

#### acw

##### MrExcel MVP
Ian

Assuming that the cell you want to test is B1 then try

=if(b1>0,COUNTIF('1 MMM-YY'!E8:E29,"SET")+COUNTIF('2 MMM-YY'!E8:E29,"SET")+COUNTIF('3 MMM-YY'!E8:E29,"SET")+COUNTIF('4 MMM-YY'!E8:E29,"SET")+COUNTIF('5 MMM-YY'!E8:E29,"SET")+COUNTIF('6 MMM-YY'!E8:E29,"SET")+COUNTIF('7 MMM-YY'!E8:E29,"SET") ,"")

Tony

#### ianfav

##### New Member
GR8, thanks Tony, works a treat.
I forgot the ,"") so I was always getting FALSE displayed in the result cell.

Replies
1
Views
415
Replies
5
Views
486
Replies
1
Views
235
Replies
4
Views
659
Replies
4
Views
586

1,171,063
Messages
5,873,561
Members
432,984
Latest member
WilMel

### 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