Embedded IF statement in an IF()

F

field1

How do I add another parameter IF statement to the formula below (whic
users so graciously helped me with and made such an impression at m
workplace that something like this could be done?


=IF(B6>0,IF(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)) ,"", "Objec
Code Doesn't Exist "), "")


In addition to checking if B6 is in the A6:A39 column, I also need i
to check if a cell in the current worksheet says “NOT ALLOWABLE
 
F

Frank Kabel

Hi
If I understood you you want to check if B6 is in the range A6:A39 AND
another cell hast your value “NOT ALLOWABLE”. But what do you want to
return then? So you may state your desired result :)
 
F

field1

It checks both conditions, if a value in B6 is in the list in the othe
worksheet AND if the text "NOT ALLOWABLE" Is in a cell in the curren
worksheet. If it is it then prints out the text "Object Code Doesn'
Exist
 
F

Frank Kabel

Hi
so try (if A1 is the cell with the text"
=IF(B6>0,IF(AND(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)),A1 = "NOT
ALLOWABLE") ,"", "Object
Code Doesn't Exist "), "")
 
F

field1

It WORKS!! when checking if both conditions are true. If instead I nee
it to check if one or the other is true, what do I need to change?

=IF(B6> 0,IF(AND(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)),A1 = "NO
ALLOWABLE") ,"", "Object Code Doesn't Exist "), "")

Again, a million smiley faces!
 
F

Frank Kabel

Hi
just replace AND with OR:
=IF(B6> 0,IF(OR(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)),A1 = "NOT
ALLOWABLE") ,"", "Object Code Doesn't Exist "), "")
 
F

field1

=IF(B6>0,IF(OR(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)),SummaryBudget!C6="NO
ALLOWABLE"),"","Object Code Not Allowed"),"")

I'm almost there!! What I have learned about IF() statements!

Now if I would like my statement "Object Code Not Allowed" to print ou
if

B6 IS NOT in the column list OR
C6 equals "NOT ALLOWABLE"

can this IF() statement be modified one more time?

By
 
F

Frank Kabel

Hi
just change the order of the second IF parameter to

=IF(B6>0,IF(OR(ISNUMBER(MATCH(B6,SummaryBudget!A6:A39,0)),SummaryBudget
!C6="NOT
ALLOWABLE"),"Object Code Not Allowed",""),"")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top