SOLVED

# looking to complete an if/countif/and statement

Copper Contributor

# looking to complete an if/countif/and statement

The formula is currently at =IF(AND(COUNTIF(\$P\$2:\$P\$210,\$S\$214),COUNTIF(\$N\$2:\$N\$210,S215)), \$C2, "")

The goal is to check column P for cells containing a specific value AND column N for a specific value. If both are true the output i want is to be from column C that aligns with whatever row satisfies the statement. I got it to work for C2 but I haven't figured out to continue, as it may not be in order.

*Note* there will never be a duplicate so i am not worried about there being more than one instance where column P and N will have multiple rows with the same info

best response confirmed by mecs80 (Copper Contributor)
Solution

# Re: looking to complete an if/countif/and statement

in excel 365 try:
=XLOOKUP(\$S\$214&S215, \$P\$2:\$P\$210&\$N\$2:\$N\$210, \$C\$2:\$C\$210, "")
1 best response

Accepted Solutions
best response confirmed by mecs80 (Copper Contributor)
Solution

# Re: looking to complete an if/countif/and statement

in excel 365 try:
=XLOOKUP(\$S\$214&S215, \$P\$2:\$P\$210&\$N\$2:\$N\$210, \$C\$2:\$C\$210, "")