+ Reply to Thread
Results 1 to 4 of 4

Blank until at least 1 variable is entered, but stil calculate average

  1. #1
    Forum Contributor
    Join Date
    08-24-2011
    Location
    Van Wert, Ohio
    MS-Off Ver
    Excel 2010, 2000
    Posts
    104

    Blank until at least 1 variable is entered, but stil calculate average

    Cell D39 has the formula

    =(D4+D11+D18+D25+D32)/5

    I want the cell to remain blank until at least on variable is entered, but then I want it to calculate the average of only the cells that have a variable in them.

    Just so I am clear

    D4 = 20

    D11 = 50

    D 18 = BLANK

    D25 = BLANK

    D32 = BLANK

    Average would be 35

    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Blank until at least 1 variable is entered, but stil calculate average

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: Blank until at least 1 variable is entered, but stil calculate average

    Try this:

    =IF(COUNT(D4,D11,D18,D25,D32)=0,"",AVERAGE(D4,D11,D18,D25,D32))

    The AVERAGE function ignores blanks.

    Hope this helps.

    Pete

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Blank until at least 1 variable is entered, but stil calculate average

    One way...

    =(D4+D11+D18+D25+D32)/COUNTA(D4,D11,D18,D25,D32)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    08-24-2011
    Location
    Van Wert, Ohio
    MS-Off Ver
    Excel 2010, 2000
    Posts
    104

    Re: Blank until at least 1 variable is entered, but stil calculate average

    Thanks guys once again you have come through for me

+ 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