ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Complex Formula Getting Error.. (https://www.excelbanter.com/excel-discussion-misc-queries/86842-complex-formula-getting-error.html)

cbanks

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

=IF(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISN UMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(S EARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH(" 2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L 505)),"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(ISN UMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(S EARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH(" 2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L 505)),"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.

Dave O

Complex Formula Getting Error..
 
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)


Dominic

Complex Formula Getting Error..
 
cbanks,

You may be able to use a formula like this:

=if(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISN UMBER(SEARCH("PSSNAP",N505)),"Sales",IF(OR(ISNUMBE R(SEARCH("2699",L505)),(ISNUMBER(SEARCH("4004",L50 5)),(ISNUMBER(SEARCH("2036",L505)),(ISNUMBER(SEARC H("8010",L505))),"Warning","")

Untested but looks like it should work.



"cbanks" wrote:

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

=IF(ISNUMBER(SEARCH("WARN",J505)),"Warning",IF(ISN UMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(S EARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH(" 2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L 505)),"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(ISN UMBER(SEARCH("PSSNAP",N505)),"Sales",IF(ISNUMBER(S EARCH("WARN",L505)),"Warning",IF(ISNUMBER(SEARCH(" 2699",L505)),"Warning",IF(ISNUMBER(SEARCH("4004",L 505)),"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.



All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com