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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
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
Joined
Oct 11, 2006
Messages
6
GR8, thanks Tony, works a treat.
I forgot the ,"") so I was always getting FALSE displayed in the result cell.
 

Forum statistics

Threads
1,136,709
Messages
5,677,324
Members
419,688
Latest member
sarahmichelle

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
Top