Hello,
I am not an experienced programmer, but trying to learn. I need to write a macro that will perform the function of essentially a big nested IF statement, combining the statements below. In the statements below, the #2 if statement would be pasted in the "Not Ok" spot of the 1st, the 3rd into the 2nd, and so on.

1. =IF(ISNUMBER(SEARCH("A",E5)),$J$5+(C5/(SQRT(1+$N$5^2))),"Not OK")
2. =IF(ISNUMBER(SEARCH("H",E5)),$J$7+(C5/(SQRT(1+$N$7^2))),"Not OK")
3. =IF(ISNUMBER(SEARCH("K",E5)),$J$9+(C5/(SQRT(1+$N$9^2))),"Not OK")
4. =IF(ISNUMBER(SEARCH("M",E5)),$J$11+(C5/(SQRT(1+$N$11^2))),"Not OK")
5. =IF(ISNUMBER(SEARCH("O",E5)),$J$13+(C5/(SQRT(1+$N$13^2))),"Not OK")
6. =IF(ISNUMBER(SEARCH("P",E5)),$J$15+(C5/(SQRT(1+$N$15^2))),"Not OK")
7. =IF(ISNUMBER(SEARCH("L",E5)),$J$17+(C5/(SQRT(1+$N$17^2))),"Not OK")
8. =IF(ISNUMBER(SEARCH("N",E5)),$J$19+(C5/(SQRT(1+$N$19^2))),"Not OK")
9. =IF(ISNUMBER(SEARCH("J",E5)),$J$21+(C5/(SQRT(1+$N$21^2))),"Not OK")

The excel spreadsheet has about 10K rows. So I would need the results to be displayed in T5, T6, T7...

Thanks so much in advance for any help.