ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Last Months Data!! (https://www.excelbanter.com/excel-worksheet-functions/8157-last-months-data.html)

Jeff

Last Months Data!!
 
I am trying to auto populate a cell with sum of users for last month:

Column A Column B
Month No of Users

I have managed to calculate, this weeks, last weeks and the last 30 days
total of users using a variation of:
=SUMIF(A1:A100, "="&TODAY()-7, B1:B100)

I want to be able to see the last calender month total. So today I would get
the total number of users for November.

I have tried adding the MONTH function but the SUMIF function does like all
the arguments needed to calculate the what last month was.

Any help would be appreciated.
-
Jeff

Don Guillett

try
=sumproduct((month(a1:a100)=11)*b1:b100)

--
Don Guillett
SalesAid Software

"Jeff" wrote in message
...
I am trying to auto populate a cell with sum of users for last month:

Column A Column B
Month No of Users

I have managed to calculate, this weeks, last weeks and the last 30 days
total of users using a variation of:
=SUMIF(A1:A100, "="&TODAY()-7, B1:B100)

I want to be able to see the last calender month total. So today I would

get
the total number of users for November.

I have tried adding the MONTH function but the SUMIF function does like

all
the arguments needed to calculate the what last month was.

Any help would be appreciated.
-
Jeff




Dave R.

Try

=SUMPRODUCT(--(MONTH(A1:A100)=MONTH(TODAY())-1),B1:B100)




"Jeff" wrote in message
...
I am trying to auto populate a cell with sum of users for last month:

Column A Column B
Month No of Users

I have managed to calculate, this weeks, last weeks and the last 30 days
total of users using a variation of:
=SUMIF(A1:A100, "="&TODAY()-7, B1:B100)

I want to be able to see the last calender month total. So today I would

get
the total number of users for November.

I have tried adding the MONTH function but the SUMIF function does like

all
the arguments needed to calculate the what last month was.

Any help would be appreciated.
-
Jeff




Peo Sjoblom

You can do it easier by using sumproduct and MONTH but if you want to use
SUMIF you would need something like

=SUMIF(A1:A100, "="&DATE(YEAR(TODAY()),MONTH(TODAY())-1,1),
B1:B100)-SUMIF(A1:A100, ""&DATE(YEAR(TODAY()),MONTH(TODAY()),0), B1:B100)


Regards,

Peo Sjoblom

"Jeff" wrote:

I am trying to auto populate a cell with sum of users for last month:

Column A Column B
Month No of Users

I have managed to calculate, this weeks, last weeks and the last 30 days
total of users using a variation of:
=SUMIF(A1:A100, "="&TODAY()-7, B1:B100)

I want to be able to see the last calender month total. So today I would get
the total number of users for November.

I have tried adding the MONTH function but the SUMIF function does like all
the arguments needed to calculate the what last month was.

Any help would be appreciated.
-
Jeff


Jeff

Thanks for the help.

"Dave R." wrote:

Try

=SUMPRODUCT(--(MONTH(A1:A100)=MONTH(TODAY())-1),B1:B100)




"Jeff" wrote in message
...
I am trying to auto populate a cell with sum of users for last month:

Column A Column B
Month No of Users

I have managed to calculate, this weeks, last weeks and the last 30 days
total of users using a variation of:
=SUMIF(A1:A100, "="&TODAY()-7, B1:B100)

I want to be able to see the last calender month total. So today I would

get
the total number of users for November.

I have tried adding the MONTH function but the SUMIF function does like

all
the arguments needed to calculate the what last month was.

Any help would be appreciated.
-
Jeff






All times are GMT +1. The time now is 11:00 AM.

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