Hello everyone. So I'm new to excel and have been trying to teach myself how to use it to its full potential with moderate progress. However I've encountered a problem that ive been unable to solve myself despite much trial and error. So im getting the VALUE error trying to use the search function due to the cell being searched has a drop down with various listings. All the listings can be divided into 2 categories, ASME and CSA, that im trying to make work with the search function in a formula from another cell. Here it is.

=IF(AND(SEARCH("ASME",AS3),Q8<=6,Q8>0),"1.5 ",IF(AND(SEARCH("ASME",AS3),Q8>6,Q8<=13),"3",IF(AND(SEARCH("ASME",AS3),Q8>13,Q8<=25),"4",IF(AND(SEARCH("ASME",AS3),Q8>25),"5 ",IF(AND(SEARCH("CSA",AS3),Q8<=10,Q8>0),"2.5 ",IF(AND(SEARCH("CSA",AS3),Q8>10),"3.5 ",""))))))


So it functions fine if i stick to any ASME codes on the drop down cell, AS3, however if i switch to a CSA code I get the VALUE error. I understand why im getting it as it cant find ASME on any of the CSA code listings. My question is how do i get it to search for CSA without getting hung up on not finding ASME and without combining the key words in the same search function as it would diminish the whole point of switching between the two codes in the first place. Any help would be greatly appreciated. Thanks for your time.