Forum Discussion
Vesperwind
Jul 21, 2023Copper Contributor
Too many arguments error on IF/COUNTIF nested function: how to solve
Hi all, I need to write an excel formula with way too many nested functions, like the following one, but much longer: =IF(COUNTIF(F7;"*Example A*");"A";IF(COUNTIF(F7;"*Example B*");"B";IF(COUN...
- Jul 21, 2023
=INDEX(J2:J23,MATCH(TRUE,ISNUMBER(SEARCH(I2:I23,F7)),0))
An alternative could be this formula along with a reference table. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel 2021. The formula is in cell B3.
SergeiBaklan
Jul 21, 2023Diamond Contributor
Initial formula
=IF(
COUNTIF(F7, "*Example A*"), "A",
IF( COUNTIF(F7, "*Example B*"), "B",
IF( COUNTIF(F7, "*Example C*"),"C",
IF(COUNTIF(F7, "*Example D*"),"D",
IF( COUNTIF(F7, "*Example E*"), "E",
IF( COUNTIF(F7, "*Example F*"), "F",
IF( COUNTIF(F7, "Example G*"), "G",
IF(COUNTIF(F7, "*Example H*"), "H",
"")
) ) ) ) ) ) )
works correctly. Which formula doesn't work?