+ Reply to Thread
Results 1 to 6 of 6

Count/IF formula between multiple Worksheets

Hybrid View

  1. #1
    Registered User
    Join Date
    04-09-2011
    Location
    Moberly, MO
    MS-Off Ver
    Excel 2003
    Posts
    3

    Count/IF formula between multiple Worksheets

    I have a budget spreadsheet that my family is starting to use and I want to "tech" it up. I would like to make the budget amount for the month (for example April) be the last 3 months average of what I actually spent. The problem is that the last 3 months are zeros and I get an amount that is not what I am looking for (85 dollars spent this month and nothing for the last 3 brings back an average of 21.50 for example). Any help would be great!
    Last edited by shotgunpet; 04-10-2011 at 02:59 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,351

    Re: Budget Spreadsheet needs "Techy Touch"

    Instead of using AVERAGE, use SUM/COUNTIF ... sum the values ($85) but COUNTIF non-zero values (1) which will give you a more realistic "average" of $85.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-09-2011
    Location
    Moberly, MO
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Budget Spreadsheet needs "Techy Touch"

    can someone write this formula out for me as I am not getting it. I have never used the countif formula.

    Bill

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Budget Spreadsheet needs "Techy Touch"

    The formula would look like:

    =SUM(A1:A4)/COUNTIF(A1:A4,"<>0")

    Here is help for COUNTIF()

    http://www.excelfunctions.net/ExcelCountif.html

  5. #5
    Registered User
    Join Date
    04-09-2011
    Location
    Moberly, MO
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Budget Spreadsheet needs "Techy Touch"

    Thanks for the help I will look at the link. I tried the formula but I am working across multiple worksheets in a single file so my formula looks like this:

    =SUM(January!C12:April!C12)/COUNTIF(January!C12:April!C12,"<>0")

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Count/IF formula between multiple Worksheets

    That won't work - COUNTIF() doesn't like 3D ranges but you can do workarounds.

    Try this:

    =SUM(January:April!C12)/SUM(COUNTIF(January!C12,"<>0"),COUNTIF(February!C12,"<>0"),COUNTIF(March,"<>0"),COUNTIF(April!C12,"<>0"))

    An easier solution would be to have a cell on each monthly sheet equate to a 1 if the C12 cell on that sheet <> 0. Then you could have SUM()/SUM().

+ 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