Forum Discussion

ray75's avatar
ray75
Copper Contributor
Dec 06, 2025

Controlling Formula Output in Excel Based on Cell Entry

Scenario Description

In this scenario, cell B1 in Excel contains a value of 50. Cell B2 uses the formula =B1+25-A2 to calculate its value. When the number 25 is entered into cell A2, the result in B2 is 50.

Desired Outcome

The objective is to ensure that cell B2 remains empty until a value is entered into cell A2. Currently, B2 will display a result regardless of whether A2 has an entry. The goal is to prevent B2 from showing any value or calculation until A2 contains data.

Question

How can this behaviour be achieved in Excel so that B2 only displays a result after an entry is made in A2?

4 Replies

  • Olufemi7's avatar
    Olufemi7
    Brass Contributor

    Hi ray75​,

    You can make sure B2 stays blank until A2 has a value by using an IF statement. Replace your formula with: 

    =IF(A2="","",B1+25-A2)


    Optional: If you only want B2 to calculate when A2 contains a number, use:

    =IF(ISNUMBER(A2),B1+25-A2,"")

     

    This way, B2 remains empty until A2 has a valid entry, exactly as you described.

    Hope this helps!

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor
    =IF( ISNUMBER(A2), B1 + 25 - A2, "" )

    B2 will display a numeric result, only if A2 contains a number

    • ray75's avatar
      ray75
      Copper Contributor

      Fantastic...... many thanks for your help and solution....

Resources