Please help with If formula

microhunt

Board Regular
Joined
Aug 14, 2017
Messages
57
Office Version
  1. 2021
Platform
  1. Windows
I would apprecaite anyone who can help me with IF formula.

My formula is in cell "A4"

If T4 is false and B4 or N4 is greater than zero then output "K4" If T4 is false and B4 and N4 or both blank then output nothing just blank.

If T4 is True and N4 or O4 is greater than zero then equals "K4" If T4 is True and N4 and O4 or both blank then output nothing just blank.

Thank You
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I have worked out part of it

Excel Formula:
=IF(OR(T4="TRUE",N4>0,O4>0),K4,"")
 
Upvote 0
Your conditions are like the following:

Rich (BB code):
IF T4 is False
  IF B4 or N4 is greater than zero then output "K4"
  ELSE IF B4 and N4 or both blank then output nothing just blank (this is actually B4 or N4 is blank)
  ELSE ???
ELSE (Which is T4 is True case)
  IF N4 or O4 is greater than zero then equals "K4"
  ELSE IF N4 and O4 or both blank then output nothing just blank (this is actually N4 or O4 is blank)
  ELSE ???
END IF

You see? There are two uncovered conditions. You need to return something if both conditions return false, otherwise, for example, you'll see #NA if T4 is false, and B4 and N4 are zero or less.

The following formula works with Excel version 2016 and above (because of the IFS function). You can see how I covered the ELSE condition by using the last condition as TRUE in the IFS function.

Excel Formula:
=IF(T4=TRUE,
    IFS(OR(B4>0, N4>0), K4, OR(ISBLANK(B4), ISBLANK(N4)), "", TRUE, "MISSING CONDITION"),
    IFS(OR(N4>0, O4>0), K4, OR(ISBLANK(N4), ISBLANK(O4)), "", TRUE, "MISSING CONDITION")
)

Let us know if you are using an earlier version of Excel. IFS function can be changed by using nested IF functions.
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,826
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top