x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 189

# amend if formula

Hi Experts excel 2007

I need to amend the following. ..
=IF(C2="Completed","Complete",IF(C2<>"",C2,IF(AND(C2="",A2=""),"",IF(C2="",VLOOKUP(A2,H12:L19,2,FALSE)))))

To if c2 is complete then complete...if a2 has text then vlookup, if A2 is blank then c2..if a2 is blank and c2 is blank then blank. .
0
route217
• 2
• 2
2 Solutions

Commented:
=IF(C2="Completed","Complete",IF(A2="",C2,VLOOKUP(A2,H12:L19,2,FALSE)))

however if the lookup fails this will return 0 - is that a problem?
0

=IF(C2="Complete","Complete",IF(A2<>"",VLOOKUP(A2,H12:L19,2,FALSE),IF(A2="",C2,IF(AND(A2="",C2=""),""))))
0

Author Commented:
Hi expert

What about if a2 is blank and c2 is blank. ..then would the formula return blank?
0

=IF(C2="Complete","Complete",IF(A2<>"",VLOOKUP(A2,H12:L19,2,FALSE),IF(AND(A2="",C2=""),"",IF(A2="",C2))))
0

Author Commented:
Thank for the feedback
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.