IF next cell > 0 then display results for this cell

ianfav

New Member
Joined
Oct 11, 2006
Messages
6
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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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
 
Upvote 0
GR8, thanks Tony, works a treat.
I forgot the ,"") so I was always getting FALSE displayed in the result cell.
 
Upvote 0

Forum statistics

Threads
1,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top