ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Functions (https://www.excelbanter.com/excel-programming/323169-functions.html)

Teresa

Functions
 
Column A: Column C:
Jan - 18 19000
Jan - 21 24000
Jan - 24 15000
Feb - 11 39000
Feb - 15 62000
Feb - 26 7000
Mar - 7 15000

I need to get this in format

Jan Feb

<20k 2 1
21-49 1 1
50-75 1

The formula involved obviously involves a COUNTIF but need to condition on
the month

Thanks




JulieD

Functions
 
Hi Teresa

one option is to use the following formulas
assuming your data range is A2:C8
and you want the answers in
B2:C14
the formula for B12 would be
=SUMPRODUCT(--(MONTH($A$2:$A$8)=1)*($C$2:$C$8<=20000))
for B13
=SUMPRODUCT(--(MONTH($A$2:$A$8)=1)*($C$2:$C$820000)*($C$2:$C$8< =49000))
and for B14
=SUMPRODUCT(--(MONTH($A$2:$A$8)=1)*($C$2:$C$849000)*($C$2:$C$8< =75000))

the formulas can then be copied for feb changing the 1 to 2 e.g.
=SUMPRODUCT(--(MONTH($A$2:$A$8)=2)*($C$2:$C$8<=20000))

Cheers
JulieD

"teresa" wrote in message
...
Column A: Column C:
Jan - 18 19000
Jan - 21 24000
Jan - 24 15000
Feb - 11 39000
Feb - 15 62000
Feb - 26 7000
Mar - 7 15000

I need to get this in format

Jan Feb

<20k 2 1
21-49 1 1
50-75 1

The formula involved obviously involves a COUNTIF but need to condition
on
the month

Thanks







All times are GMT +1. The time now is 02:36 PM.

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