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
  • Learn & ask questions
Solved

Is there a way in Excel to do a formula to calculate a value per row but to limit to number to sum at a certain cutoff point?

Posted on 2013-05-17
4
176 Views
Last Modified: 2014-03-18
I have a spreadsheet that I'm using to do so revenue projections and what I want to do is use one of the columns in a formula to calculate revenue based on a couple other variables.

The column has a range of values from 500 down to 0.  What I want to do is to have another field be a variable so I can plug in a number (say 25) and only have the formula calculate a total up to 25 but ignore the remainder over 25.

Is there a function or a way to apply a type of "IF" statement to multiple rows?

The idea is "IF the number is greater than or equal to N use N, If less than N use the number in the column".

So for the below list the total would be: 25+25+25+22+13+3+0=113

464 (25)
268 (25)
101(25)
22 (22)
13 (13)
3 (3)
0 (0)

I want to just have a field I can type in a number and then have the totals adjust based on that variable number.

Is this possible?  Thanks!

Ike
0
Comment
Question by:Ike23
4 Comments
 
LVL 12

Expert Comment

by:HugoHiasl
ID: 39176434
You could just use the MIN(field,field) function.

MIN(430;25) = 25
MIN(268;25) = 25
MIN(7;25) = 7
0
 
LVL 26

Expert Comment

by:redmondb
ID: 39176438
Hi, Ike23.

Please see attached. The formula in C1 is...
=SUMIF(A1:A500,"<="&B1,A1:A500)+B1*COUNTIF(A1:A500,">"&B1)

Open in new window

Regards,
Brian.Twenty-Five.xls

Edit: Apologies - silly mistake corrected.
0
 
LVL 4

Author Comment

by:Ike23
ID: 39176443
I figured out how to do the IF statement and use the $ to keep the variable column constant.

=IF(J19>$Q$7,($Q$7),(J19))*$O$3

Basically this says if the column is greater than my variable limit use the variable number, if not use the column number and then multiply it times the amount in my other variable column.

Works great!
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39176454
Instead of your IF, you could use:
=MIN(J19,$Q$7)*$O$3
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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