# Can anyone break down this formula for me pls

#### shdwfx

##### New Member
=if(d4<>5,countif(o\$33,">0")+1, "-")

Last edited:

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Breaking it down

if(d4<>5 is saying if the cell D4 is not equal to 5 to perform countif(o\$33,">0")+1

countif(o\$33,">0")+1 is saying to count all the cells in that range that have a value of greater than 0 (basically all positives and to add 1
As you drag down the column will expand because
o\$33 row is locked at the third row. Because of the +1 the cell returned will have a minimum of 1.

,"-") if D4 is equivalent to 5 to put a "-" in the cell

another way to write is which is doing the opposite due to change of operater sign

=IF(D4=5,"-",COUNTIF(O\$3:O3,">0")+1)

=if(d4<>5,countif(o\$33,">0")+1, "-")

Last edited:
You could step through the formula and/or try Excel's Formula Evaluate.

If D4 is less than or greater than 5
then Count O\$3:O3 and add 1

otherwise i.e. D4 is equal to 5 entry the "-"

Thank you!!

Replies
8
Views
235
Replies
10
Views
559
Replies
2
Views
978
Replies
4
Views
167
Replies
11
Views
555

1,203,465
Messages
6,055,574
Members
444,799
Latest member
CraigCrowhurst

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