I'm not sure what you're trying to do exactly, but keeping as much as what you have right now as possible, I would use this:
=IF(ISNUMBER(SEARCH("S9",D1,1)),CONCATENATE("s370fpd",5,".",IFERROR(MID(D1,SEARCH("V9",D1)+3,SEARCH(")",D1,SEARCH("V9",D1))-SEARCH("V9",D1)-3),"0")),CONCATENATE("$ebcdic",5,"."))
I substituted "0"
with
IFERROR(MID(D1,SEARCH("V9",D1)+3,SEARCH(")",D1,SEARCH("V9",D1))-SEARCH("V9",D1)-3),"0")
which is what gets what's between brackets after V9
.
It also appears to me that you can turn CONCATENATE("$ebcdic",5,".")
into "$ebcdic5."
directly and CONCATENATE("s370fpd",5,"."
into CONCATENATE("s370fpd5."
, and/or use &
to make things a little shorter, but that's only subject to what you've put in your question:
=IF(ISNUMBER(SEARCH("S9",D1,1)),"s370fpd5."&IFERROR(MID(D1,SEARCH("V9",D1)+3,SEARCH(")",D1,SEARCH("V9",D1))-SEARCH("V9",D1)-3),"0"),"$ebcdic5.")