Solved

SUMPRODUCT Update

Posted on 2014-01-29
8
172 Views
Last Modified: 2014-01-30
Hi,
Quick question, still learning how to work with sumproduct.  I have the following formula and I would like to add the criteria AS <>Yes how would I do that?

=SUMPRODUCT((MOD(ROW($AO$10:$AO$484)-ROW(AP10),2)=1)*1,$AO$10:$AO$484)
0
Comment
Question by:jmac001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 15

Expert Comment

by:David L. Hansen
ID: 39818129
This should be helpful:
http://www.mrexcel.com/forum/excel-questions/460593-nesting-if-statement-sumproduct.html

Let me know if that is going to work for you or not.
0
 
LVL 35

Expert Comment

by:mvidas
ID: 39818267
jmac001,

Just add       $AS$10:$AS$484<>"Yes"       as an argument before the final one, like

=SUMPRODUCT((MOD(ROW($AO$10:$AO$484)-ROW(AP10),2)=1)*1,$AS$10:$AS$484<>"Yes",$AO$10:$AO$484)

Matt
0
 

Author Comment

by:jmac001
ID: 39818324
Sl8zr the link was kinda of helpful but returned #value

Matt - Tried your solution and received 0 for my value? The current sum is 225 and with the updated function the new total should be 197.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 15

Expert Comment

by:David L. Hansen
ID: 39818333
Can you post what you tried just now?
0
 
LVL 35

Assisted Solution

by:mvidas
mvidas earned 250 total points
ID: 39818392
Is it possible to post your workbook? I'm a little puzzled by what you're trying to accomplish with your mod statement. If you're only trying to get odd numbers, try:

=SUMPRODUCT((MOD(ROW($AO$10:$AO$484),2)=1)*($AS$10:$AS$484<>"Yes")*($AO$10:$AO$484))

Matt
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 39818750
I think the original formula sums every other row starting with the second cell in the range

Matt's last version also does that but the reason for the  ROW(Range)-MIN(ROW(Range)) type construction is that the formula will be more robust, in that it will still return the same value, even if you insert or delete rows above the referenced range.

To retain the original robust intent but add that criteria you can use this version:

=SUMPRODUCT((MOD(ROW($AO$10:$AO$484)-ROW($AO$10),2)=1)*($AS$10:$AS$484<>"Yes"),$AO$10:$AO$484)

Note I replaced AP10 with $AO$10 as that more closely resembles the ideal setup

regards, barry
0
 
LVL 35

Expert Comment

by:mvidas
ID: 39818813
in that it will still return the same value, even if you insert or delete rows above the referenced range.
Nice catch. I was wondering about that
0
 

Author Closing Comment

by:jmac001
ID: 39820666
Thanks Barry and Matt, the solution worked.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question