Forum Discussion

ElecEngine's avatar
ElecEngine
Copper Contributor
May 13, 2022
Solved

Cell that auto fills by if statement or allows manual input

I'm trying to have a cell "C5" that auto fills it using a if statement =IF(B5="No","N/A",""). Ideally i want when cell B5 contains "No" the cell auto fills. When the Cell B5 contains "Yes" it will al...
  • PeterBartholomew1's avatar
    May 13, 2022

    ElecEngine 

    The functional programming style of an Excel sheet formula is intended to prevent the reassignment of a new value to a cell such as you describe.  On the other hand. an imperative programming language such as VBA is allowed to make such state changes.  Hence HansVogelaar 's solution.

     

    There is a trick that may achieve the effect you require without resorting to VBA.  If you insert a new column D then a formula there can be made to display in column B, provided the cell in column B is blank.  The default text in column D/C is heavily indented and right aligned in order to move it left into the adjacent cell.

Resources