#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default sumif formula

Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sumif formula

Try this (note: you can't use entire columns as range references in this
formula (unless you're using Excel 2007))

=SUMPRODUCT(--(L1:L100="HCAIN"),--(P1:P1000),P1:P100)

Biff

"Louie" wrote in message
...
Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the
negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default sumif formula

Hi Louie,

Try the following array formula:
=SUM(IF((L1:OFFSET(L1,MATCH("*",L:L,-1)-1,)="HCAIN")*(P1:OFFSET(L1,MATCH("*",L:L,-1)-1,)0),P1:OFFSET(L1,MATCH("*",L:L,-1)-1,),))
which you input with 'Ctrl-Shift-Enter', instead of just 'Enter'.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Louie" wrote in message ...
Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 40
Default sumif formula

thanks for your quick response, that worked perfect!

--
Louie


"T. Valko" wrote:

Try this (note: you can't use entire columns as range references in this
formula (unless you're using Excel 2007))

=SUMPRODUCT(--(L1:L100="HCAIN"),--(P1:P1000),P1:P100)

Biff

"Louie" wrote in message
...
Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the
negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sumif formula

You're welcome. Thanks for the feedback!

Biff

"Louie" wrote in message
...
thanks for your quick response, that worked perfect!

--
Louie


"T. Valko" wrote:

Try this (note: you can't use entire columns as range references in this
formula (unless you're using Excel 2007))

=SUMPRODUCT(--(L1:L100="HCAIN"),--(P1:P1000),P1:P100)

Biff

"Louie" wrote in message
...
Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the
negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default sumif formula

XL2007

=SUMIFS(P:P,L:L,"HCAIN",P:P,"0")


"Louie" wrote:

Hello, I made a formula that looks like this, =SUMIF(L:L,"HCAIN",P:P)
however, I need it to sum only the positive numbers and ignore the negative
numbers, I am missing something in it and I cant figure it out.
thank you for your help!
--
Louie

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
odd sumif formula Dave F Excel Discussion (Misc queries) 0 October 11th 06 05:33 PM
Sumif Formula Eleanor M Excel Worksheet Functions 2 April 10th 06 05:50 PM
Formula using SUMIF & IF BiggyTwo Excel Worksheet Functions 3 March 18th 06 02:36 AM
Is there a MAXIF formula similar to the SUMIF formula? tlc Excel Discussion (Misc queries) 2 March 13th 06 08:07 PM
formula (perhaps sumif?) redb Excel Discussion (Misc queries) 3 October 3rd 05 01:48 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"