Hi,
Sounds like your looking for the exact same formula in column C and D. Is that correct? If so just set D1 = C1. As for C1, try this:
=IF(AND(A1>0,B1>0),IF(A1 = "A",RIGHT(B1,LEN(B1)-SEARCH("-",B1)),IF(A1 = "H",LEFT(B1,SEARCH("-",B1)-1),0)),0)
HTH
jtp
Bookmarks