ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sm Product a Calendar Month Range? (https://www.excelbanter.com/excel-worksheet-functions/8592-sm-product-calendar-month-range.html)

John

Sm Product a Calendar Month Range?
 
I have a list of days for the year 2005 in Col A. In Col B opposite each day
in 2005 (Col A) I have the location I have visited. Is it possible to add up
the number of times I was say in London, for the month of January, without
having to enter a specific sumproduct range in the formula?

Thanks




Peo Sjoblom

No, you need to enter a range, you might want to enter a range that will
cater to future needs (making it larger than at present necessary)

=SUMPRODUCT(--(MONTH(Range1)=1),--(ISNUMBER(Range1)),--(Range2="London"))

Regards,

Peo Sjoblom

"John" wrote:

I have a list of days for the year 2005 in Col A. In Col B opposite each day
in 2005 (Col A) I have the location I have visited. Is it possible to add up
the number of times I was say in London, for the month of January, without
having to enter a specific sumproduct range in the formula?

Thanks





Don Guillett

assuming valid dates in A to count
=sumproduct((month(rngA)=1)*1)

--
Don Guillett
SalesAid Software

"John" wrote in message
...
I have a list of days for the year 2005 in Col A. In Col B opposite each

day
in 2005 (Col A) I have the location I have visited. Is it possible to add

up
the number of times I was say in London, for the month of January, without
having to enter a specific sumproduct range in the formula?

Thanks






Peo Sjoblom

Note that it will count blank cells as January


Regards,

Peo Sjoblom

"Don Guillett" wrote:

assuming valid dates in A to count
=sumproduct((month(rngA)=1)*1)

--
Don Guillett
SalesAid Software

"John" wrote in message
...
I have a list of days for the year 2005 in Col A. In Col B opposite each

day
in 2005 (Col A) I have the location I have visited. Is it possible to add

up
the number of times I was say in London, for the month of January, without
having to enter a specific sumproduct range in the formula?

Thanks








All times are GMT +1. The time now is 07:03 PM.

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