+ Reply to Thread
Results 1 to 3 of 3

Leaving cell with formula blank until data is entered.

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    2

    Leaving cell with formula blank until data is entered.

    Hi, I've been having a problem trying to figure out how to create a formula for my spreadsheet in excel 2007. Column A has the numbers 1-52 (representing weeks in a year) Column B will be left blank until a user enters a number. Basically each week a measurement will be entered into column B and I want to make a formula that will tell the user whether the measurement is within a reference range. So for example if the measurement in B1 is 23 and the reference range is 22-25 I want "IN RANGE" to appear in C1 right next to it. On the other hand, if the measurement is say, 27 I want "OUT OF RANGE" to appear in C1 and so on in the subsequent cells. So far this is what I have:

    =IF(OR(B1>25,B1<22),"OUT OF RANGE","IN RANGE")

    This formula is entered into C1

    It works, but when I copy and paste the formula from C1 into the remaining cells of column C the result for each pasted cell is "OUT OF RANGE" since the cells in column B are blank. I am hoping to find a way to have the formula present in all the cells of column C but remain blank until a value is entered into column B.

    I've tried searching various forums and read posts from users having similar problems and used formulas they've suggested, however nothing has worked for me yet. Any help would be greatly appreciated. Thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Leaving cell with formula blank until data is entered.

    Try this:

    =IF(B1="","",IF(AND(B1<=25,B1>=22),"IN RANGE","OUT OF RANGE"))

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Leaving cell with formula blank until data is entered.

    Thank you so much, worked perfectly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1