Solved

Excel Formula help

Posted on 2013-05-15
4
345 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:J.R. Sitman
  • 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:J.R. Sitman
ID: 39170196
@zorvek.  You are correct, yours worked.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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…

856 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