Complex Formula Getting Error..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ok.. I keep getting an error when i add on another piece to this formula..

=IF(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISNUMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(SEARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH("2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L505)),"Warning",IF(ISNUMBER(SEARCH("2036",L505)),"Warning",""))))))

I think it may be because im adding my seventh level so to speak but im not
sure.. I need to add more conditions to this formula like below..

=IF(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISNUMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(SEARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH("2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L505)),"Warning",IF(ISNUMBER(SEARCH("2036",L505)),"Warning",IF(ISNUMBER(SEARCH("8010",L505)),"Warning",""))))))

Is there anyway to keep adding to this function its giving me an error? or
is there another way i need to go about this? I have some minor VBA
experience but dont think i can write all the code.
 
You're looking for warning codes in several of your IFs- you might look
for these all at once by grouping them into an OR statement. That will
free up some capacity in your IF statement.
=OR(ISNUMBER(SEARCH("WARN",J505),ISNUMBER(SEARCH("WARN",L505)),ISNUMBER(SEARCH("­2699",L505)),etc)
 
cbanks,

You may be able to use a formula like this:

=if(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISNUMBER(SEARCH("PSSNAP",N505)),"Sales",IF(OR(ISNUMBER(SEARCH("2699",L505)),(ISNUMBER(SEARCH("4004",L505)),(ISNUMBER(SEARCH("2036",L505)),(ISNUMBER(SEARCH("8010",L505))),"Warning","")

Untested but looks like it should work.
 

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

Back
Top