Forum Discussion
Nikola_Tokosova
May 15, 2024Copper Contributor
Conditional filling of a cell
This is not conditional formatting. I would like to ask for advice:
I have two cells and I need to insert a function into another cell that automatically fills in predefined text depending on whether both cells meet a certain condition and another text depending on whether only one of the cells meets a certain condition.
An example: If both cells contain YES, then the amount 5,000 will appear in the third cell, however, if only one cell contains YES and one contains NO, then only 3,000 will appear in the third cell.
Thank you very much for advice!
Nikol
4 Replies
- SergeiBaklanDiamond Contributor
- Riny_van_EekelenPlatinum Contributor
- PeterBartholomew1Silver Contributor
Another option is simply to count the "yes"s
= LET( yesCount, COUNTIFS(conditions, "yes"), CHOOSE(1 + yesCount, "", 3000, 5000) )The formula is expressed using Excel 365 syntax.
- PeterBartholomew1Silver Contributor
All that is required is a formula. One such possibility is
= IFS( AND(condition1="yes", condition2="yes"), 5000, OR( condition1="yes", condition2="yes"), 3000, TRUE, "" )