Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default SUMPRODUCT that contains multiple criteria

I have written the following formula, but an #N/A value is being returned.

=SUMPRODUCT(--(YTD!$B$2:$B$65536={"*7*","*16*"}),--(YTD!$AB$2:$AB$65536))

I am trying to sum the cells in column AB where the cell in column B
contains either a 7 or a 16.

Please could someone advise if I need to make a correction to the existing
formula, or if I should be using a different function altogether.

Many thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default SUMPRODUCT that contains multiple criteria

You can't use wildcards in this situation, but as you have only got
one criterion, you could use SUMIF which does support wildcards:

=SUMIF(YTD!B:B,"*7*",YTD!AB:AB) + SUMIF(YTD!B:B,"*16*",YTD!AB:AB)

Hope this helps.

Pete

On Sep 2, 9:57*am, Sarah (OGI)
wrote:
I have written the following formula, but an #N/A value is being returned..

=SUMPRODUCT(--(YTD!$B$2:$B$65536={"*7*","*16*"}),--(YTD!$AB$2:$AB$65536))

I am trying to sum the cells in column AB where the cell in column B
contains either a 7 or a 16. *

Please could someone advise if I need to make a correction to the existing
formula, or if I should be using a different function altogether.

Many thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default SUMPRODUCT that contains multiple criteria

Hi,

You could try this

In range F14:F15, you have *7* and *16*. In cell F13 you have Name and in
cell G13, you have Amount. In G14, you have
=DSUM($B$2:$B$65536,G13,F13:F15). In cell B1 you have Name and in cell AB1,
you have Amount

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Sarah (OGI)" wrote in message
...
I have written the following formula, but an #N/A value is being returned.

=SUMPRODUCT(--(YTD!$B$2:$B$65536={"*7*","*16*"}),--(YTD!$AB$2:$AB$65536))

I am trying to sum the cells in column AB where the cell in column B
contains either a 7 or a 16.

Please could someone advise if I need to make a correction to the existing
formula, or if I should be using a different function altogether.

Many 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
SUMPRODUCT with multiple criteria [email protected] Excel Worksheet Functions 11 January 23rd 09 12:35 AM
Sumproduct-multiple criteria = and not = Tasha Excel Worksheet Functions 4 September 22nd 08 10:10 PM
SUMPRODUCT / SUMIF on Multiple Worksheets with Multiple Criteria kazoo Excel Discussion (Misc queries) 2 August 21st 08 06:22 PM
Sumproduct multiple criteria Scott Kieta[_2_] Excel Worksheet Functions 6 May 29th 08 08:44 PM
multiple criteria in if or sumproduct tbird0566 Excel Worksheet Functions 1 September 19th 05 09:11 PM


All times are GMT +1. The time now is 04:30 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"