ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUMIF Filesize (https://www.excelbanter.com/excel-discussion-misc-queries/224482-sumif-filesize.html)

Rookie_User

SUMIF Filesize
 
I have two columns of data. One with a date and the other with filesize. I
would like sum all the filesizes within a given year and month. I have
another worksheet that has month and year but can't figure out how to use the
sumif function.

Sheeloo[_4_]

SUMIF Filesize
 
Use
=SUMPRODUCT(--(YEAR(A1:A20)=2009),--(MONTH(A1:A20)=3),B1:B20)

if dates are in Col A, Sizes in Col B, year is 2009 and month is 3...

You can also use
=SUMPRODUCT(--(YEAR(A1:A20)=C1),--(MONTH(A1:A20)=C2),B1:B20)
If C1=2009 and C2=3...


"Rookie_User" wrote:

I have two columns of data. One with a date and the other with filesize. I
would like sum all the filesizes within a given year and month. I have
another worksheet that has month and year but can't figure out how to use the
sumif function.


Rookie_User

SUMIF Filesize
 
Can you use sumproduct when it's referring to another worksheet? So
basically your feedback will work - thank you. But I was trying to have a
summary worksheet that would compile the worksheet that has all the data on
it.

"Sheeloo" wrote:

Use
=SUMPRODUCT(--(YEAR(A1:A20)=2009),--(MONTH(A1:A20)=3),B1:B20)

if dates are in Col A, Sizes in Col B, year is 2009 and month is 3...

You can also use
=SUMPRODUCT(--(YEAR(A1:A20)=C1),--(MONTH(A1:A20)=C2),B1:B20)
If C1=2009 and C2=3...


"Rookie_User" wrote:

I have two columns of data. One with a date and the other with filesize. I
would like sum all the filesizes within a given year and month. I have
another worksheet that has month and year but can't figure out how to use the
sumif function.


Sheeloo[_4_]

SUMIF Filesize
 
Yes, it will work if the range is on another sheet...
Just add 'Sheetname'! before the range...

"Rookie_User" wrote:

Can you use sumproduct when it's referring to another worksheet? So
basically your feedback will work - thank you. But I was trying to have a
summary worksheet that would compile the worksheet that has all the data on
it.

"Sheeloo" wrote:

Use
=SUMPRODUCT(--(YEAR(A1:A20)=2009),--(MONTH(A1:A20)=3),B1:B20)

if dates are in Col A, Sizes in Col B, year is 2009 and month is 3...

You can also use
=SUMPRODUCT(--(YEAR(A1:A20)=C1),--(MONTH(A1:A20)=C2),B1:B20)
If C1=2009 and C2=3...


"Rookie_User" wrote:

I have two columns of data. One with a date and the other with filesize. I
would like sum all the filesizes within a given year and month. I have
another worksheet that has month and year but can't figure out how to use the
sumif function.



All times are GMT +1. The time now is 05:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com