Try 'wrapping' your formula in an IFERROR - for example
=IFERROR(MID(G5,FIND("LI",G5),7),right(G5,7))
I tried it on a very quick & dirty sample and it appeared to work - however, beware that if your error is not generated by a missing "LI", this formula will return right(G5,7) ... but I can't see anything there that would produce that ...