Solved

Excel Formula help

Posted on 2013-05-15
4
313 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
Comment Utility
Use this formula:

=SUMPRODUCT(J5:J34,N5:N34)

Kevin
0
 
LVL 80

Expert Comment

by:byundt
Comment Utility
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)
Comment Utility
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
Comment Utility
@zorvek.  You are correct, yours worked.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

744 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

12 Experts available now in Live!

Get 1:1 Help Now