Forum Discussion
Help with IF statement please - Much Appreciated
- 3 years ago
Yes, you can modify the formula to prioritize the owner with the "Waiting" state, even if both dates are empty. You can use the OR function to check if either the state or date is empty and then adjust the logic accordingly. Here's the modified formula:
=IF(AND(OR(ISBLANK(Table1[State]),Table1[State]<>"Waiting"),ISBLANK(Table1[Date])),"",IF(Table1[State]="Waiting","Bob","Dave"))
This formula checks if either the state or date is empty or if the state is not "Waiting" and the date is empty, in which case it returns an empty string. Otherwise, it returns "Bob" if the state is "Waiting" or "Dave" otherwise.
Owner = IF(AND(Table1[State] = "Waiting", ISBLANK(Table1[Date])), "Dave", IF(Table1[State] = "Waiting", "Bob", ""))
Note that you will need to replace "Table1" with the actual name of your table, and "State" and "Date" with the actual names of the columns that contain the state and date data, respectively.
MAwwad thank you for your reply. This works in the coloumn but shows both owners when both dates are empty. Is there a way to show the one with the state as Waiting, if they are both empty please?
Thank you
- MAwwad3 years agoSolution Sage
Yes, you can modify the formula to prioritize the owner with the "Waiting" state, even if both dates are empty. You can use the OR function to check if either the state or date is empty and then adjust the logic accordingly. Here's the modified formula:
=IF(AND(OR(ISBLANK(Table1[State]),Table1[State]<>"Waiting"),ISBLANK(Table1[Date])),"",IF(Table1[State]="Waiting","Bob","Dave"))
This formula checks if either the state or date is empty or if the state is not "Waiting" and the date is empty, in which case it returns an empty string. Otherwise, it returns "Bob" if the state is "Waiting" or "Dave" otherwise.