• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Average in multiple months

Luigi802

New Member
How can I average the total amount I spent on 1 item, but only the months that I spent money on it, for example, Let's say I spend 100 on clothes in jan, 35 in March, 62 in April, 50 in August......and so on I want to only average the amount I spent in the months I spent it. Like right now we are in December, if I just take the total divided by the total amount of months I'd be dividing by 12, when I only want to divide by 4 because I only bought clothes 4 out of the 12 months.........does that make sense?
 

Attachments

  • Book1.xlsx
    10.9 KB · Views: 4
Hi, Luigi!

The AVERAGE function in excel, when you select a range larger than your data, ignore the blank cells... for example:

A1 : 1
A2 : 2
A3 : 3
A4 to A10 --> Empty Cells

If you put this function: AVERAGE(A1:A10), the result is 2 = (1 + 2 + 3)/3 Blessings!
 
Hi, Luigi!

The AVERAGE function in excel, when you select a range larger than your data, ignore the blank cells... for example:

A1 : 1
A2 : 2
A3 : 3
A4 to A10 --> Empty Cells

If you put this function: AVERAGE(A1:A10), the result is 2 = (1 + 2 + 3)/3 Blessings!

Well yes if it were a simple average that would work; however, if you look at the attached sheet, I want to average the total amount against only the months that item was purchased, not against the total amount of months in the year
 
Ok, Luigi802... I didn't see your file before. Now, check the array formula in G2 (for introduce this formula, you have to press Ctrl + Shift + Enter, and not just Enter). Blessings!
 

Attachments

  • Book1 (3).xlsx
    11.3 KB · Views: 13
Ok, Luigi802... I didn't see your file before. Now, check the array formula in G2 (for introduce this formula, you have to press Ctrl + Shift + Enter, and not just Enter). Blessings!

AWESOME! Thank you, that works! Blessings to you as well!
 
Back
Top