Solved

Excel Formula help

Posted on 2013-05-15
4
330 Views
Last Modified: 2013-05-15
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
Comment
Question by:jrsitman
  • 2
4 Comments
 
LVL 81

Accepted Solution

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

=SUMPRODUCT(J5:J34,N5:N34)

Kevin
0
 
LVL 81

Expert Comment

by:byundt
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

by:zorvek (Kevin Jones)
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

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now