Check engine light is on at my 1994 Nissan Quest and i run a diagnostic test and egr valve failed if i replace egr valve do you think it will ressolve the issue?

It's a start there Poindexter. Fix the part that failed and retest. Maybe you should take it to a certified mechanic that understands basic car diagnostics.