Forum Discussion
Admaiora61
Aug 21, 2023Copper Contributor
Isolating Operators in a Cell Reference
Is there a way to write the following uinsg <= in a cell reference? Kindly refer to the folloiwng: =IF(L2&"<="&D2,E2) Cell C2 conatins <= but when I reference the cell, it wraps it in quotes...
- Aug 21, 2023In general I'd say yes unless you want to change that cell C2 and not go into the formula. Another variant is:
=IF(COUNTIF(L2, C2&D2),E2)
SergeiBaklan
Aug 21, 2023Diamond Contributor
As variant
=IF( SWITCH(C2, "<", L2<D2, "<=", L2<=D2, "=", L2=D2, ">", L2>D2, ">=", L2>=D2 ), E2 )- Admaiora61Aug 21, 2023Copper ContributorThank you for quick response Sergei.
It would appear easier just to use the operators in the expression in lieu of a cell reference.- mtarlerAug 21, 2023Silver ContributorIn general I'd say yes unless you want to change that cell C2 and not go into the formula. Another variant is:
=IF(COUNTIF(L2, C2&D2),E2)- Admaiora61Aug 22, 2023Copper ContributorHey mtarler;
The final expression is as follows:
=IF(K2="","",IF(COUNTIF(K2,$B2&$C2),$D2,IF(COUNTIFS(K2,$E2&$F2,K2,$G2&$H2),$I2,$J2)))
It worked perfectly. Thanks a million...