count if + if....issue

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello i have the following formula, but it appears to not be working correctly.

=IF(COUNTIF(D8:O8,"<=3"),0,IF(E26>=100%,C27/12*COUNTIF(D8:O8,">0"),0))

basically, what i want to show is

if the count D8:O8 is <= 3 then 0,
otherwise
IF(E26>=100%,C27/12*COUNTIF(D8:O8,">0"),0))

can someone pls help with my logic!

thx u
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
basically
D8:O8 = months

so im showing the annual bonus...the annual bonus doesnt apply to ppl that have less than 3 months of tenure

so if D8:O8 is <=3 months

then annual bonus is 0

otherwise, calculate bonus using this:
IF(E26>=100%,C27/12*COUNTIF(D8:O8,">0"),0))


can u help!
 
Upvote 0
Does this work:
=IF(COUNT(D8:O8)<=3,0,IF(E26>=100%,C27/12*COUNTIF(D8:O8,">0"),0))
 
Upvote 0
What, exactly, sits in D8:O8? Text or numbers? And are all Cells populated or just for when an employee has worked?

Posting an example might be best as it will ensure we provide something that suits your needs.

Matty
 
Upvote 0
In row 7, Do you have like Jan through to Dec and then in row 8 you are putting a '1' to show that the person was there?

If so, then the above works, if you have text in row 8, then you'll need to do something slightly different
 
Upvote 0
thxs buddy

i made in a mistake in my countif

i had 0, so once i changed it to "" or blanks, the formula worked...thxs alot!
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,633
Members
452,933
Latest member
patv

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