IF Statement Formula -

Copper Contributor

Hi All,

 

I am trying to create a formula which basically checks my cell C3 if it is a "Y" or "N" 

 

If it is a "Y" I need the cell to return "Ok" if it is "N" I then need the cell to look in cell E3 to see if the number is >= to 3 if it is greater than 3 I need it to return "Overdue" if it not greater than 2 I need it to return "Not Due" 

 

I can do the separate formula's but am struggling to merge them together, any help would be appreciated. 

 

Thanks

2 Replies

@JMExcel2023   Perhaps:

 

=IF(C3="Y", "Ok", IF(E3 >= 3, "Overdue", "Not Due"))

or

=IFS(C3="Y", "Ok", E3>=3, "Overdue", TRUE, "Not Due")

 

You might want to change ">=" to ">", or add a separate result for E3=3.  Your description is ambiguous.

 

@JMExcel2023 

 

The IFS function might serve you better in this case. It's easier to construct when there are multiple conditions to check. If it's safe to assume that the numbers in E3 are always integers (no fractions), then this formula works. If you can see 2.5 arising at times, you might want to revise it. But you get the idea. Here's the formula:

=IFS(C3="Y","OK",AND(C3="N",E3>2),"Overdue",AND(C3="N",E3<=2),"Not Due")

And here's a reference to study on the IFS function.