ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   "if" function (https://www.excelbanter.com/excel-discussion-misc-queries/63706-if-function.html)

raf

"if" function
 
I've got three columns
Column A Column B Column C
L 5-Jan-2006 5,000
M 7-Jan-2006 100
L 1-Feb-2006 10,000
U 24-Mar-2006 10

Alpha code "L" 15,000 Function '=SUMIF(A2:A5,"L".C2:C5)'
Alpha Code "L" in Jan (??? Function)

How do I write the formula to get the alpha code L total for January?

Bob Phillips

"if" function
 
=SUMPRODUCT(--(A2:A5="L"),--(MONTH(B2:B5)=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"raf" wrote in message
...
I've got three columns
Column A Column B Column C
L 5-Jan-2006 5,000
M 7-Jan-2006 100
L 1-Feb-2006 10,000
U 24-Mar-2006 10

Alpha code "L" 15,000 Function '=SUMIF(A2:A5,"L".C2:C5)'
Alpha Code "L" in Jan (??? Function)

How do I write the formula to get the alpha code L total for January?




raf

"if" function
 
On Sat 01/07/06 12:13:00, Bob Phillips wrote:
=SUMPRODUCT(--(A2:A5="L"),--(MONTH(B2:B5)=1))

Hi Bob,
How do I get the total to equal to 5,000 for the month of January?
Thanks!

Bob Phillips

"if" function
 
=SUMPRODUCT(--(A2:A5="L"),--(MONTH(B2:B5)=1),C2:C5)
--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"raf" wrote in message
...
On Sat 01/07/06 12:13:00, Bob Phillips

wrote:
=SUMPRODUCT(--(A2:A5="L"),--(MONTH(B2:B5)=1))

Hi Bob,
How do I get the total to equal to 5,000 for the month of January?
Thanks!




raf

"if" function
 
Hi Bob,
Thanks for the formula! It works great, just what I needed.


"Bob Phillips" wrote:

=SUMPRODUCT(--(A2:A5="L"),--(MONTH(B2:B5)=1),C2:C5)



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

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