Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
excel if statement for text help?
I am trying to write an if statement in excel 2007 with the scenario: if cells b2:f2 contain a yes, then g2=yes. Any ideas?
without having to write b2, c2, d2, e2, f2 = statements out
5 Answers
- garbo7441Lv 71 decade agoFavorite Answer
You can use this formula in G2:
=IF(COUNTIF(A2:F2,"=Yes")=5, "Yes","No")
Or, if you just want a 'blank' instead of 'No' use:
=IF(COUNTIF(A2:F2,"=Yes")=5,"Yes","")
- NahumLv 71 decade ago
If the only possibilities are "yes" and "no", you should consider switching to TRUE and FALSE, which can be more directly calculated:
AND(B2:F2) returns TRUE only when the entire range is also TRUE (or blank).
OR(B2:F2) returns TRUE if at least one cell is TRUE.
Scrawny and garbo's functions work fine if you must use "yes" or "no", or if there are other possibilities.
- ScrawnyLv 71 decade ago
Enter this is G2 =IF(OR(B2="yes",C2="yes",D2="yes",E2="yes",F2="yes"),"yes","")
If any cell or cells between B2 and F2 have "yes" then G2 will return "yes".
Source(s): Experience - duceyLv 45 years ago
IF function does not artwork for you. you have 3 circumstances and each subject has different nature. for this reason, you like one or 2 greater columns and then prepare IF function. make certain, the call of workers is a headache, try employing positions or in case you have much less workers, then use their names.
- How do you think about the answers? You can sign in to vote the answer.
- snoofy 10Lv 51 decade ago
I believe what you are trying to do is possible. This link explains what the "if" statement will do, and how to build the statement you want: