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

x
Solved

# Excel Formula help

Posted on 2013-05-15
Medium Priority
369 Views
I use this formula to add up all the items in one column and then multiply it by an amount in the N column.  Each year the numbers in the column change and it's a nightmare to redo each column.

I'm not sure if I'm providing enough data, so let me know what you need.  I've attached a screen shot that might help.

=+J5*N5+J6*N6+J7*N7+J8*N8+J9*N9+J15*N15+J17*N17+J21*N21+J22*N22+J23*N23+J24*N24+J25*N25+J29*N29+J31*N31+J34*N34
budget.png
0
Question by:J.R. Sitman
[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
• 2

LVL 81

Accepted Solution

zorvek (Kevin Jones) earned 1600 total points
ID: 39170067
Use this formula:

=SUMPRODUCT(J5:J34,N5:N34)

Kevin
0

LVL 81

Expert Comment

ID: 39170105
Unless column J has a lot of fortuitous zeros, the SUMPRODUCT over the entire range will give a different answer from the original formula or SUMPRODUCT over the actual range:
=SUMPRODUCT(J5:J9,N5:N9)+J15*N15+J17*N17+SUMPRODUCT(J21:J25,N21:N25)+J29*N29+J31*N31+J34*N34
0

LVL 81

Expert Comment

ID: 39170127
Brad is assuming that the rows missing from your original function are not part of the table and are breaks of other information.

As I look at your screen shot I see that - at least from rows 27 through 34 - what you are doing is only including rows in your function that have a 1 in column J. Assuming you are doing the same in the rows above 27 and the entire table spans rows 5 through 34, my formula will work:

=SUMPRODUCT(J5:J34,N5:N34)

and will not have to be adjusted as you change the 1's to 0's and vice versa in column J. The only adjustment you have to make is to the first and/or last rows as the total number of rows increases or decreases.

What it does is multiply, for each row in the rows 5 through 34, the value in column J with the value in column N and then sum the results in all rows from 5 through 34. If the value in column J AND/OR N is blank or zero, the value included for that row is zero.

Kevin
0

Author Closing Comment

ID: 39170196
@zorvek.  You are correct, yours worked.
0

## Featured Post

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month9 days, left to enroll