# Combining two COUNTIFS formulas

1. ## Combining two COUNTIFS formulas

Hello,

I need assistance adding this COUNTIFS:

=IF(COUNTIFS('Data Entry'!\$B\$3:\$B\$100000,\$A5,'Data Entry'!\$E\$3:\$E\$100000,\$D\$1),"PERFECT USED")

Before the first COUNTIFS in the below:

=IF(B5>\$D\$2,"X",IF(COUNTIFS('Data Entry'!\$B\$3:\$B\$1048576,A5,'Data Entry'!\$A\$3:\$A\$1048576,">="&\$D\$2,'Data Entry'!\$A\$3:\$A\$1048576,"<="&\$D\$3)=0,"PERFECT ATTENDANCE",COUNTIFS('Data Entry'!\$B\$3:\$B\$1048576,A5,'Data Entry'!\$A\$3:\$A\$1048576,">="&\$D\$2,'Data Entry'!\$A\$3:\$A\$1048576,"<="&\$D\$3)))

I am trying to insert it here, but I keep getting errors:

=IF(B5>\$D\$2,"X",---Inserting Here---IF(COUNTIFS('Data Entry'!\$B\$3:\$B\$1048576,A5,'Data Entry'!\$A\$3:\$A\$1048576,">="&\$D\$2,'Data Entry'!\$A\$3:\$A\$1048576,"<="&\$D\$3)=0,"PERFECT ATTENDANCE",COUNTIFS('Data Entry'!\$B\$3:\$B\$1048576,A5,'Data Entry'!\$A\$3:\$A\$1048576,">="&\$D\$2,'Data Entry'!\$A\$3:\$A\$1048576,"<="&\$D\$3)))

I appreciate any help.

Thank you,
Nick  Register To Reply

2. ## Re: Combining two COUNTIFS formulas

Without knowing what you want this formula to do, or what your data looks like, I can only guess. But this is a valid formula, with line breaks to show the logic structure:
Formula:  `Please Login or Register  to view this content.`

Here is the same formula on one line:

Formula:  `Please Login or Register  to view this content.`

Notice that your final FALSE case just show a number as the result of COUNTIFS, which is what your original formula does. Not sure if that's what you wanted because all the other cases return a string.  Register To Reply

3. ## Re: Combining two COUNTIFS formulas

Thanks 6StringJazzer, I kept looking at it, on the version I was attempting I had a ) after Perfect Used, messing it all up.  Register To Reply