I need to analyze a text string for various string combinations then substitute an alternate string depending on the search results. The following If statements provide the logic, but since Excel is limited to 7 nested If statements, nesting is out of the question. Is there a function in VBA or some other combination of formulas that can get the desired result? Oh, and by the way if none of these strings are found I want the result to be "Other".
if(FIND("LOCK",I8,1)>0,"Lock Box",
if(FIND("CR",I8,1)>0,"Cash Receipts",
if(FIND("CONF PR T",I8,1)>0,"Taxes",
if(FIND("CONF P/R",I8,1)>0,"Conf-Payroll",
if(FIND("NF",I8,1)>0,"Nations Fund",
if(FIND("PAYMENT TR",I8,1)>0,"AP",
if(FIND("PR TX",I8,1)>0,"Taxes",
if(FIND("ZBA HRLY",I8,1)>0,"ZBA Hrly Payroll",
if(FIND("ZBA SALARY",I8,1)>0,"ZBA Salary Payroll",
if(FIND("401K",I8,1)>0,"401K",
if(FIND("FUI",I8,1)>0,"Taxes",
if(FIND("SUI",I8,1)>0,"Taxes",
if(FIND("LOC INT",I8,1)>0,"LOC Interest",
if(FIND("WORKERS COMP",I8,1)>0,"Workers Comp",
if(FIND("MEDICAL",I8,1)>0,"Medical",
if(FIND("HELD CHECKS",I8,1)>0,"Held Checks",
if(FIND("LOAN PAYMENT",I8,1)>0,"LOC Payment",
if(FIND("LOAN ADVANCE",I8,1)>0,"LOC Advance","Other"))))))))))))))))))
Thanks
if(FIND("LOCK",I8,1)>0,"Lock Box",
if(FIND("CR",I8,1)>0,"Cash Receipts",
if(FIND("CONF PR T",I8,1)>0,"Taxes",
if(FIND("CONF P/R",I8,1)>0,"Conf-Payroll",
if(FIND("NF",I8,1)>0,"Nations Fund",
if(FIND("PAYMENT TR",I8,1)>0,"AP",
if(FIND("PR TX",I8,1)>0,"Taxes",
if(FIND("ZBA HRLY",I8,1)>0,"ZBA Hrly Payroll",
if(FIND("ZBA SALARY",I8,1)>0,"ZBA Salary Payroll",
if(FIND("401K",I8,1)>0,"401K",
if(FIND("FUI",I8,1)>0,"Taxes",
if(FIND("SUI",I8,1)>0,"Taxes",
if(FIND("LOC INT",I8,1)>0,"LOC Interest",
if(FIND("WORKERS COMP",I8,1)>0,"Workers Comp",
if(FIND("MEDICAL",I8,1)>0,"Medical",
if(FIND("HELD CHECKS",I8,1)>0,"Held Checks",
if(FIND("LOAN PAYMENT",I8,1)>0,"LOC Payment",
if(FIND("LOAN ADVANCE",I8,1)>0,"LOC Advance","Other"))))))))))))))))))
Thanks