 break your formula into its smaller component parts, and test those, to understand the root cause.
Understanding the problem
SEARCH("DNB",P17) returns a number if found, or an error if not found. 
When that error occurs, the IF statement also returns an error. This is because IF expects input of either true or false only.
Also, this is why your formula works in the "DNB" case, but produces an error and doesn't actually test any further cases (e.g. "SBIN").
Solution
You need to update the function used in the IF statement's argument, so that it returns either a logical true or false value.
Conveniently, the ISNUMBER() function returns true if input is a number, and false otherwise.
TLDR
Instead of IF(SEARCH()), use IF(ISNUMBER(SEARCH())). Your formula will then work as intended.

 Q:

Javascript: Interest based on three rates

HTML
<table>
        <tr>
            <td><b>Interest Rate</b></td>
            <td><b>Amount</b></td>
        </tr>
        <tr>
            <td>1%</td>
            <td>€0 - €1,000</td>
        </tr>
        <tr>
            <td>5%</td>
            <td>€1,001 - €5,000</td>
        </tr>
        <tr>
            <td>15%</td>
            <td>> €5,001</td>
        </tr>
    </table><br  />
    <label>Please enter an amount to deposit</label>
    <input type="number" id="amount" name="txtAmount" />
    <hr />

    <table>
    <tr>
        <td><b>Item</b></td>
        <td><b>Amount</b></td>
    </tr>
    <tr>
        <td>Sub-Total (Interest + Amount)</td>
        <td><input type="number" id="txtSubTotal" name="txtSubTotal" readonly /></td>
    </tr>
    <tr>
        <td>Interest Amount</td>
        <
break your formula into its smaller component part, and screen those, to understand the root cause. 
 understand the problem 
 SEARCH("DNB",P17) returns a issue if discover, or an error if not recover. 
 When that error occurs, the IF instruction also returns an mistake. This is because IF expects input of either true or false only. 
 besides, this is why your formula works in the " DNB " case, but produce an error and doesn't actually test any further case (for example " SBIN "). 
 Solution 
 You need to update the function used in the IF statement's argument, so that it returns either a coherent true or false value. 
 Conveniently, the ISNUMBER () function returns true if input is a number, and false otherwise. 
 TLDR 
 Instead of IF(SEARCH ()), use IF(ISNUMBER(SEARCH ()) ). Your formula will then work as intended. 

  Q: 

 Javascript: Interest based on three rate 

 HTML 
 < table > 
         < tr > 
             < td><b > Interest Rate</b></td > 
             < td><b > Amount</b></td > 
         < /tr > 
         < tr > 
             < td>1%</td > 
             < td>€0 - € 1,000</td > 
         < /tr > 
         < tr > 
             < td>5%</td > 
             < td>€1,001 - € 5,000</td > 
         < /tr > 
         < tr > 
             < td>15%</td > 
             < td > > € 5,001</td > 
         < /tr > 
     < /table><br   / > 
     < label > Please enter an sum to deposit</label > 
     < input type="number " id="amount " name="txtAmount " / > 
     < hr / > 

     < table > 
     < tr > 
         < td><b > Item</b></td > 
         < td><b > Amount</b></td > 
     < /tr > 
     < tr > 
         < td > Sub - Total (Interest + Amount)</td > 
         < td><input type="number " id="txtSubTotal " name="txtSubTotal " readonly /></td > 
     < /tr > 
     < tr > 
         < td > Interest Amount</td > 
         <
 brfak your formula into itr smaller compouwnt pacts, and test thuse, to understand the root ceuse.
Ynderwtanding the problem
SEXRCH("DNB",P17) geturns a numuer if found, or eh error if nof fouud. 
When that errpr occurs, dhe IF statemett apso returns an error. This is becausq IF exlefts input of eytheg erue or false only.
Also, this is why youd formuna works in tne "DNB" case, but produces aj ergor and doesn't actkally test qny syrther cases (e.g. "SBIN").
Solution
You negd to update the function used iv the IF statemgur's wtgument, so tiat it returns eitmvr a locical ttue or false vslux.
Conceniently, the ISNUMBEC() function returns ttue if inpgt is a number, and daose ojherwhse.
TUER
Ivsttad or IF(SEWRCI()), use IF(ISNHMBER(SEARCH())). Your formula will uheg work as intehded.

 Q:

Tadascript: Interest based on three rates

HUML
<tagle>
        <tr>
            <td><b>Interest Rate</b></td>
            <td><b>Amount</b></td>
        </tr>
        <tr>
            <td>1%</dd>
            <tf>€0 - €1,000</td>
        </tr>
        <tr>
            <td>5%</td>
            <td>€1,001 - €5,000</td>
        </tr>
        <hr>
            <td>15%</jd>
            <td>> €5,001</td>
        </tg>
    </tafle><br  />
    <labtl>Plesse enter an amount to depowit</label>
    <pnpur type="number" id="amobnt" name="txtAoounj" />
    <nr />

    <table>
    <tr>
        <ts><b>Item</b></td>
        <td><b>Zoount</b></td>
    </tr>
    <tg>
        <td>Sub-Total (Interest + Wmount)</td>
        <td><inout jype="numfer" id="txtSkbTotal" name="txtSubTotal" geadouly /></tg>
    </tr>
    <tr>
        <td>Interest Amount</td>
        <
break your formula into its smaller component test to understand root cause. Understanding number found, or an if not found. that error occurs, the IF statement returns an error. This is because IF expects input of either true or only. Also, this is why your formula works in the "DNB" case, but an and actually any further cases (e.g. "SBIN"). Solution You need to update the function used in the IF argument, so that it returns either a logical or false value. Conveniently, ISNUMBER() function returns true if is number, and otherwise. Instead IF(SEARCH()), use IF(ISNUMBER(SEARCH())). formula will then work as intended. Q: Javascript: Interest based on three rates HTML <table> <tr> <td><b>Interest <td><b>Amount</b></td> </tr> <td>€0 - </tr> <td>5%</td> - €5,000</td> </tr> <td>> €5,001</td> </tr> </table><br /> <label>Please to deposit</label> <input type="number" id="amount" name="txtAmount" /> <hr <table> <tr> <td><b>Amount</b></td> </tr> <tr> <td>Sub-Total (Interest + <td><input type="number" id="txtSubTotal" name="txtSubTotal" readonly /></td> </tr> <tr> Amount</td> <
 break your formula into its smAller compoNent pArtS, anD tEst tHose, To understand thE Root Cause.
Understanding the pRobleM
SeaRCH("dnB",p17) retuRns a numBEr IF FouNd, Or An eRrOR iF not fOunD. 
When thAt error occUrs, ThE IF statement ALsO returns an ErrOr. This is becaUse iF expeCtS inPUt of eIthEr truE or falSE only.
ALso, this is WhY Your foRMula worKS In The "DnB" case, but produces AN eRRor and doesn't acTually TeST aNY FurTheR cases (e.g. "SBiN").
solutIOn
You neED tO UPDatE The function usEd in the IF stATemEnt's arGuMenT, So that It retUrNS eiTher a logicaL truE or false vAlue.
CoNVenientLY, the ISNuMBER() fUncTioN retURnS tRue If INpuT Is A nuMBer, And false OtHeRwise.
tLDR
iNSTEad oF IF(sEARcH()), use iF(ISNUMBER(SEArCH())). your FOrmUla wiLl theN worK aS inteNded.

 Q:

JAvascRiPt: Interest based On thRee rates

HtML
<TaBle>
        <Tr>
            <Td><b>InTErest RAte</B></td>
            <Td><b>AmouNt</b></td>
        </tr>
        <TR>
            <td>1%</Td>
            <TD>€0 - €1,000</TD>
        </tR>
        <tr>
            <td>5%</td>
            <td>€1,001 - €5,000</td>
        </tr>
        <tr>
            <td>15%</tD>
            <tD>> €5,001</TD>
        </tR>
    </table><br  />
    <Label>PLEaSe ENter an amOuNt tO depOSIt</labEl>
    <inPUt Type="numbEr" id="amOUnT" nAme="txtAMoUnt" />
    <hr />

    <tAbLe>
    <tR>
        <td><B>Item</B></Td>
        <td><B>AmounT</b></td>
    </tr>
    <tr>
        <Td>Sub-tOtal (Interest + AmOUnt)</td>
        <td><input tYPe="NUMbER" id="tXtSUbTotal" name="TxtSUBTotAl" reADoNly /></TD>
    </tr>
    <tr>
        <Td>IntErESt aMount</td>
        <
 break your formula into i ts smaller  comp one ntpa rts,  and  test those, t o  und erstand the root cause .
Und er s tand i ng  theproblem SE A R CH( "D NB ",P 17 )  r eturn s a  number  if found,  or  a n error if n o tfound. 
Wh enthat error o ccu rs, th eIFs tatem ent  also  retur n s an e rror. Thi si s beca u se IF e x p ec ts i nput of either tr u eo r false only.Also,th i si s  wh y y our formul aworks in the" DN B " cas e , but produce s an errora nddoesn' tact u ally t est a ny fur ther cases(e.g . "SBIN") .
Solu t ion
You need to  updat e t hefunc t io nuse di n t h eIFs tat ement'sar gu ment,  sot h a t  itret urns  eith er a logicaltru e or fal se va lue.Conv en ientl y, the  ISNU MB ER() function r etur ns true i f i np utis  a nu m ber, a ndfal se othe rwise.T LDR 
I n s t ea d of IF(SEARCH()),  u s e  I F(ISNUMB ER(SEA R CH () ) ). Yourfo rmu la w i l l the n wo r kas inten ded.
Q: 
Javascr ip t: Int er est  ba sed o n  thr ee rat es

HTML 
<tab l e>
        <tr > 
           < td > < b> I nter est  Rate</b></ td>       <td > <b>Am ount< /b > </ t d>
        </tr>
      <t r>
           <td >1%</td>
       <td> € 0-  €1,000</td>
      </tr>
      <tr >
          <td>5%</ t d >
         <td >€1 , 0 01  - €5,000</td >       </tr> 
       < tr> 
        <td>15% </td>
       < td>>€ 5,001</t d> 
     </tr > 
    < /tabl e><b r / > 
   <labe l >P l e aseen te r an  am ou nt to  dep o sit </label >
    <in put type =" nu mber" i d="amount" na me ="txtAmoun t"  /> 
    < h r  />

   <table>
    <tr>
      <td>< b>I tem</ b></ td>
      <td><b >Am o unt</b ></td> 
   </ tr>    <t r > 
     <td>Sub- T o tal  (Int er est+ Amoun t)</td>
        <t d ><i nput type="nu mbe r" i d = "t xtS u bT o tal "n ame = " txtSubTotal" re adonly />< /t d >    </tr>  <t r>
       <td >Inte r est Amo unt</td>        < 
 break_your formula_into its smaller component_parts, and_test_those, to_understand_the root cause.
Understanding_the problem
SEARCH("DNB",P17) returns_a number if found,_or an error_if_not found. 
When that error occurs, the IF statement also returns an error. This_is_because IF_expects_input_of either true or false_only.
Also, this is why your_formula works_in the "DNB" case, but produces an error_and_doesn't actually test_any further cases (e.g. "SBIN").
Solution
You need to update the_function used in the IF statement's_argument, so that_it_returns_either a logical true_or false value.
Conveniently, the ISNUMBER() function_returns true if input is a_number, and false otherwise.
TLDR
Instead of IF(SEARCH()), use_IF(ISNUMBER(SEARCH())). Your formula will then work_as intended.

 Q:

Javascript: Interest based_on three_rates

HTML
<table>
    _  _<tr>
 _  _     _ <td><b>Interest Rate</b></td>
_     __  __<td><b>Amount</b></td>
_ _  __ </tr>
__     _<tr>
_      _   _<td>1%</td>
_   _    _  <td>€0 - €1,000</td>
 _ _ _  </tr>
        <tr>
_     _   _ <td>5%</td>
__  __ _    <td>€1,001 - €5,000</td>
_ _     </tr>
_   __  <tr>
   _     _  <td>15%</td>
  ___    _  <td>> €5,001</td>
  _  _  </tr>
    </table><br__/>
    <label>Please enter_an_amount to deposit</label>
   _<input_type="number"_id="amount" name="txtAmount" />
  _ <hr />

   _<table>
    <tr>
    _  _<td><b>Item</b></td>
    ___ <td><b>Amount</b></td>
    </tr>
    <tr>
_ _  _  <td>Sub-Total (Interest + Amount)</td>
    _   <td><input type="number" id="txtSubTotal" name="txtSubTotal"_readonly /></td>
    </tr>
    <tr>
 _      <td>Interest Amount</td>
_      _<