And If Target achieved is more than 90% , then result should be NA.

Target Set | Target Achieved | Result | |

1st Condition | 100 | Less than or Equal to 90 but More than 50 | Difference of Target Set and Target Achieved |

2nd Condition | 100 | More Than 90 | NA |

3rd Condition | 100 | Less than or Equal to 50 | Then result should return to 50 Only and not difference |

Please let me know how to write this logic in excel Cell.