A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi @soil doc,
For your concern, your formula has two syntax issue:
- The part
AND(B4>=0.01, >=0.05, is missing the comparison subject, so Excel doesn't know what >= 0.05 is comparing against - The "YES", "NO" part is the outcome of IF formula so they should be outside the AND()
Therefore, the revised version of your formula would be
= IF(AND(B4>=0.01,B4<=0.05),"YES","NO")
If you want to do it with COUNTIF/COUNTIFS, there are different ways to do it depending on what you want to achieve:
- For a single cell formula:
=IF(COUNTIFS(B4, ">=0.01", B4, "<=0.05"), "YES", "NO") - For counting values between 0.01 and 0.05 in a range (e.g. B1:B20):
=COUNTIFS(B1:B20, ">=0.01", B1:B20, "<=0.05") - If you want to return YES/NO if there is any matching value exists:
=IF(COUNTIFS(B1:B20, ">=0.01", B1:B20, "<=0.05")>0,"YES","NO")
Hope my sharing may be helpful for your concern. If you have any questions or need any further clarification, please leave a comment here and I will be happy to continue to help you.
Thank you for your patience and understanding. I'm looking forward to your reply.
If the answer is helpful, please click "Accept Answer" and kindly upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.