Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# sum product help

Posted on 2011-03-09
Medium Priority
355 Views
Experts,
In my spreadsheet, at R43:H43 I need to evaluate using sumproduct as follows:

Sum G4:G42 only if each corresponding formula such as F4-G4 = 0.

For example, if F16-G16 <> 0 do not include the value of G16 in my sum in R43:H43
0
Question by:Frank Freese
[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
• 4
• 3
• 2
• +1

LVL 85

Expert Comment

ID: 35084566
I have no clue from those ranges what you are trying to do - could you post a small sample?
0

LVL 20

Expert Comment

ID: 35084580
Hi

Can you try this -

=SUMPRODUCT((F2:F42-G2:G42=0)*(G2:G42))

thanks
Ardhendu
0

LVL 50

Expert Comment

ID: 35084593
I'm not sure why you want this in a range, how is H43 different from I43 or J43?

For what you asked specifically try

=SUMPRODUCT((F4:F42=G4:G42+0,G4:G42)

regards, barry
0

LVL 50

Expert Comment

ID: 35084601
sorry, missing parethesis, change to

=SUMPRODUCT((F4:F42=G4:G42)+0,G4:G42)

0

Author Comment

ID: 35084674
sure - it is attached
sumproduct.xlsx
0

LVL 50

Expert Comment

ID: 35084715
For that example you can use SUMIF, i.e.

=SUMIF(I3:I6,0,H3:H6)

regards, barry
0

LVL 50

Expert Comment

ID: 35084731
Oops! you're summing column G aren't you? so that should be

=SUMIF(I3:I6,0,G3:G6)

barry
0

LVL 20

Accepted Solution

Ardhendu Sarangi earned 2000 total points
ID: 35084733
Try this in your totals column - =SUMPRODUCT((G3:G42-H3:H42=0)*(H3:H42))

See attached,
sumproduct.xlsx
0

Author Comment

ID: 35084949
the user just changed their mind (surprised?)
here's what I have that is not working
=SUMPRODUCT((F4:F42=H4:H42),H4:H42)

if the value in column H = the value in column F add the value in Column H

for example, if in H5 the value is \$800 and in F5 the value is \$801 do not sum.
if in H6 the value = \$800 and in F6 the value is \$800 sum
0

Author Closing Comment

ID: 35085245
I was able to modify what you sent to work - thank you
0

## Featured Post

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
###### Suggested Courses
Course of the Month10 days, 3 hours left to enroll