#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default SumIf with an Or

I have a SUMIF statement that doesn't appear to be working -- not throwing an
error, but not returning the correct value:

=SUMIF(DataSheet!$C:$C,"61505 OR 61515 OR 61517",DataSheet!$E:$E)

What I'm trying to say is that if the value in column C is 61505 or 61515 or
61517, then it should sum the values in column E. I have not used a range
for C or E, just the columns, because the number of rows will change

Googling on this tells me that it's probably not possible with a SumIf --
and I tried SumProduct, but that didn't work either.

Suggestions? Thanks in advance.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 195
Default SumIf with an Or

Hi Karen,

This might help you -

=SUM(IF(A10=61505,B9:B11,IF(A10=61515,B9:B11,IF(A1 0=61517,B9:B11))))

This is an array function so you need to press Alt+Ctrl then Enter. If
you did it correctly braces {} will appear.


Thanks,

Shail

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 195
Default SumIf with an Or

Hi Karen,

This might help you:

=SUM(IF(A10=61505,B9:B11,IF(A10=61515,B9:B11,IF(A1 0=61517,B9:B11))))

This is an array function

Thanks

Shail


KarenH wrote:

I have a SUMIF statement that doesn't appear to be working -- not throwing an
error, but not returning the correct value:

=SUMIF(DataSheet!$C:$C,"61505 OR 61515 OR 61517",DataSheet!$E:$E)

What I'm trying to say is that if the value in column C is 61505 or 61515 or
61517, then it should sum the values in column E. I have not used a range
for C or E, just the columns, because the number of rows will change

Googling on this tells me that it's probably not possible with a SumIf --
and I tried SumProduct, but that didn't work either.

Suggestions? Thanks in advance.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default SumIf with an Or

Try this:

=SUMPRODUCT((C1:C1000={61505,61515,61517})*E1:E100 0)

With SumProduct, you *cannot* use total column references (C:C, E:E).


--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"KarenH" wrote in message
...
I have a SUMIF statement that doesn't appear to be working -- not throwing
an
error, but not returning the correct value:

=SUMIF(DataSheet!$C:$C,"61505 OR 61515 OR 61517",DataSheet!$E:$E)

What I'm trying to say is that if the value in column C is 61505 or 61515 or
61517, then it should sum the values in column E. I have not used a range
for C or E, just the columns, because the number of rows will change

Googling on this tells me that it's probably not possible with a SumIf --
and I tried SumProduct, but that didn't work either.

Suggestions? Thanks in advance.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 195
Default SumIf with an Or

Hi RD,

Thanks for this thing. I too tried and it is working just perfect.

Thanks again

Shail


RagDyeR wrote:
Try this:

=SUMPRODUCT((C1:C1000={61505,61515,61517})*E1:E100 0)

With SumProduct, you *cannot* use total column references (C:C, E:E).


--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"KarenH" wrote in message
...
I have a SUMIF statement that doesn't appear to be working -- not throwing
an
error, but not returning the correct value:

=SUMIF(DataSheet!$C:$C,"61505 OR 61515 OR 61517",DataSheet!$E:$E)

What I'm trying to say is that if the value in column C is 61505 or 61515 or
61517, then it should sum the values in column E. I have not used a range
for C or E, just the columns, because the number of rows will change

Googling on this tells me that it's probably not possible with a SumIf --
and I tried SumProduct, but that didn't work either.

Suggestions? Thanks in advance.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default SumIf with an Or

You're welcome.
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

"shail" wrote in message
ups.com...
Hi RD,

Thanks for this thing. I too tried and it is working just perfect.

Thanks again

Shail


RagDyeR wrote:
Try this:

=SUMPRODUCT((C1:C1000={61505,61515,61517})*E1:E100 0)

With SumProduct, you *cannot* use total column references (C:C, E:E).


--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"KarenH" wrote in message
...
I have a SUMIF statement that doesn't appear to be working -- not throwing
an
error, but not returning the correct value:

=SUMIF(DataSheet!$C:$C,"61505 OR 61515 OR 61517",DataSheet!$E:$E)

What I'm trying to say is that if the value in column C is 61505 or 61515

or
61517, then it should sum the values in column E. I have not used a range
for C or E, just the columns, because the number of rows will change

Googling on this tells me that it's probably not possible with a SumIf --
and I tried SumProduct, but that didn't work either.

Suggestions? Thanks in advance.



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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
Help with SUMIF function PO Excel Worksheet Functions 6 June 1st 06 09:07 AM
Sumif of Sumif perhaps? Fred Excel Discussion (Misc queries) 2 March 29th 06 05:39 PM
SUMIF Ferg Excel Worksheet Functions 3 February 28th 06 04:37 AM
SUMIF with Mutiple Ranges & Criteria PokerZan Excel Discussion (Misc queries) 5 August 4th 05 10:31 PM


All times are GMT +1. The time now is 10:49 AM.

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

About Us

"It's about Microsoft Excel"