Excel solution required to calculate the sum of cells according to reference cell - excel

I want to calculate the overburden pressure at certain depth (reference C14) but including the effect of water table. As, below water table submerged density should be considered and above saturated density should be considered. So, i am looking for a formula which can calculate automatically the pressure by changing the water table depth (reference E1). Please see the attachments (spreadsheet and images):
Sample file

Dont know exactly if i understand what you are trying.
You can use nested if clause to get what you want to do:
=IF(E5<3;"DOE SOMETHING HERE for EGL 0-3";IF(E5<7,5;"DO SOMETHING HERE FOR 3-7.5";"DO SOMETHING FOREGL ABOVE 7.5"))
I just did 3 Steps but it should be clear from here. Excel will evalualte the if clause from left to right until it reaches the first thing that matches. This whay you can just always ask "E5 < Max Value" because if it is between 3 and 7.5 the first if will not trigger but the second one and the it ends. For the last step you just use the "Else" clause.

Related

Qlikview: How do I limit chart (straight table) lines to calculated values?

I have a problematic table, which is interconnected and goes out of memory often, but I've limited it to show 50 items, but now want to limit it to show only lines that one column calculated. The calculation - one price minus another one. I need to limit the lines so that the % or the value is less than 0 (meaning everything with -% or -<0 is acceptable).
Using a calculated dimension does not let me do an if function to accomplish this. The deduction does not work for some reason.
Any help?
I just edited the formula to "=if(dimension='-' or dimension='0', null(), dimension)". So the kicker was actually setting this all to "null()" so the "Suppress When Value Is Null" recognizes things to null.
This actually solves my problem in a different way, however the goal is the same. This skips the values where a calculation is impossible due to lack from one source.
[UPDATE Jun-3rd-2017]: I figured out exactly what I needed. I just made the calculation on the script side and now a calculated dimension is actually restricting all of the values by the calculated dimension as was intended.

Removing Lower/Upper Fence of outliers from input data to then be evaluated

What I have attempted:
AVERAGEIF(B11:V11,">+MEDIAN(B11:V11)")
What I am trying to do:
I would like to take the average of the upper half of given data. Elaborating more. I would like to find a formula that will allow me to remove a given lower fence of outliers and dissect the data then given to me. I would greatly prefer to maintain this formula within one cell "not grabbing different results from formulas within multiple cells".
Update:
Following through I found the solution.. I think.
One thing I should have explained further:
The data coming in replicating a typical sqrt function.
What I wanted to achieve is to capture the mean of the "plateau" of the data.
The equation I used was:
=AVERAGEIF(B3:B62,(">"&+TRIMMEAN(B3:B62,0.8)),B3:B62)
This was something I just copied and pasted. of course "B3" and "B62" are significant only for my application.
My rough explanation of the equation:
TRIMMEAN will limit the AVERAGE to the top 20%(">")(0.8) of the data selected. So for my application, this SHOULD give me a rough mean of the "plateau" of the data i would like to find the mean for.
This formula calculates the Median() of the range, then AverageIf() uses the median and only grabs values that are greater than or equal to >= the median ~ giving you the average of the 'top-half' of your values.
AVERAGEIF(A1:A10,">="&MEDIAN(A1:A10))
Hope this help!

Displaying multiple items in Excel graph and few calculation issues

I've done some Googling for each of my issues but haven't found exactly the results as I wanted. Things I need to be done doesn’t probably include any macros/VBA skills, just basic knowledge of Excel.
Now to my spreadsheet. I'm a Dota 2 player and I like statistics. I like it that much that I'd like to keep track of my achievements and results. Only problem is that the game tracker sucks and to get great information in web you have to pay for it, so I decided it's time for me to create my own spreadsheet to track my skills.
I don't know which place is the best to share my spreadsheet but I uploaded it to Estonian uploading host, link is here. I will also provide with pictures so you don't have to download anything.
This is what it looks like in general:
Problem number 1: The left table, or column has 1000 rows. In web design it's possible to make elements fixed depending on the scroll, I'd like to use similar feature here. If the table gets scrolled down, the right table (area with games, bonus and graph) will get scrolled down with it.
Problem number 2: Average MMR. I'd like to show average MMR after each entry depending on the first entries. Right now there's avg MMR for J4:J8. The calculation for J8 looks like this: =AVERAGE(C4:C8). For J7 it looks like this: =AVERAGE(C4:C7). I'd like to do this for all my 1000 rows, but I don't want to type it out. If I try to drag down from the corner, it will continue with C5:C8, C6:C9 etc (so it changes the starting point)
Problem number 3: Under longestGame there's currently Date and Hero. This should show the Date and Hero of which the longest game occurred. I tried to do this with LOOKUP function but it required table to be in ascending order, which I don't want. For current, 44,22, there should be Storm Spirit and 14.06.2015.
Problem number 4: Graph. I'd like to display three series on graph - MMR, average MMR and game length (time). The problem is, that MMR and average MMR will be in the numbers on 3000-7000 but the game length will only be probably in timeframe 20:00-120:00. Maybe it's possible to add two sets of values to the Y axis or maybe set Time series maximum 200:00 and minimum 0:00 and create graph according to this. I'm really stupid making graphs and I haven't figured out a clever way yet.
Problem number 5: Graph again. Right now I have to set the series for the graph. I've currently set it to C4:C54 (so 50 rows). I'd like it to move around a bit and by that I mean that if there happens to be C55-th game then the graph would start from C5:C55 and move along (so it'll count 50 last games).
I'm in a benevolent mood so rather than downvoting your question, because it is not really suitable for this forum I'm going to give you some hints and guidance. The numbers below correspond to the problems in your question.
Excel permits more than one window to be used on the same workbook -
so one window can show the data and one the summary.
Find out about absolute and relative cell addressing - its a valuable bit of knowledge for anyone serious about Excel and it will be of use in solving your problem.
Find out about the MATCH function. You can use this to find out which row of your table contains the longest game, shortest game, max MMR, min MMR by matching an element from the summary on the right (cols M onward) against the appropriate column table on the left. The find out about the INDEX function - this can be used to pull the values in the columns for Hero and Date which correspond to a specific row (such as the row containing the longest game, shortest game, etc). Search INDEX MATCH and find out why using these two functions in combination is often preferred to using the VLOOKUP function
Persevere - there are graph options available to do what you want and the only way to really learn is to go through the pain of trying them out, failing and working at it until you succeed.
Set up an area of worksheet to hold the 50*3 table of data for your graphs. Find out about the COUNT function and think how it might be of use in determining which rows of the data table map to the 50 rows of graph data. Then think about how to populate the graph data table using one of the functions mentioned above. Incidentally, C4:C54 is actually 51 rows, not 50.

Create a Filter for Closest Value to a Specific Decimal Range

I've created a spreadsheet for choosing resistor combinations for an RC Operational Amplifier. I've used a list of available capacitors and resistors for my limiting values to produce values of one of the resistors based on the resistance and capacitance values of the available (standard) components. The values in my tables look like 7.23436793078690. I wish to apply a filter that will find the values closest to a whole number (1592.00188622182000). Then I wish to apply another filter that will compare those values to a list of available resistors and highlight resistors closest to the desired value. Many of the returned values of R2 are negative values so I also wish to filter values of R2<0.
For this spreadsheet I've used the equation R2=(Req)(R1)/(R1-Req), which is an equation to determine Req, for parallel resistors, that is solved for R2. In Column 1, the Rows are populated with values for available (standard) resistors. All other columns are populated with the equation for R2. The value for Req is obtained from another table in the Workbook that uses available (standard) capacitor values. Therefore, Columns B and beyond are labeled R2(C=.47 uF), for example. Essentially, Columns B and beyond reference the available (standard) capacitor values.
I wish to highlight the values I discussed in the first paragraph so I can quickly scan the workbook for the best possible value of R2. Then I can quickly determine the values of R1 and C to complete my task and minimize the tolerance for the given op-amp application.
I have some C++ programming knowledge and I have enough experience with Excel so I should be able to understand where and how to do what I wish to do but I wish to get some advice and direction from a more experienced Excel user.
***UPDATE***
Since my first post, I've done some research. It seems like the easiest approach would be to apply a "closest to" filter. I've attached a screenshot of a small portion of my workbook, which contains the equation for the "closest to" filter, a partial range of available resistor values, and the results for my filter. I have multiple tabs in my workbook.
I lied. I'm unable to post an image until I gain 10 reputation. I have 6 reputation. If you're reading this post and you're able to contribute to my reputation, please contribute.
This is my equation: =INDEX(A3:BZ26,MATCH(MIN(ABS(A3:BZ26-CB3)),ABS(A3:BZ26-CB3),0))
The equation format is: =INDEX(rng,MATCH(MIN(ABS(rng-value)),ABS(rng-value),0))
My formula seems to be correct but it returns "#VALUE!".

Interpolating data points in Excel

I'm sure this is the kind of problem other have solved many times before.
A group of people are going to do measurements (Home energy usage to be exact).
All of them will do that at different times and in different intervals.
So what I'll get from each person is a set of {date, value} pairs where there are dates missing in the set.
What I need is a complete set of {date, value} pairs where for each date withing the range a value is known (either measured or calculated).
I expect that a simple linear interpolation would suffice for this project.
If I assume that it must be done in Excel.
What is the best way to interpolate in such a dataset (so I have a value for every day) ?
Thanks.
NOTE: When these datasets are complete I'll determine the slope (i.e. usage per day) and from that we can start doing home-to-home comparisons.
ADDITIONAL INFO After first few suggestions:
I do not want to manually figure out where the holes are in my measurement set (too many incomplete measurement sets!!).
I'm looking for something (existing) automatic to do that for me.
So if my input is
{2009-06-01, 10}
{2009-06-03, 20}
{2009-06-06, 110}
Then I expect to automatically get
{2009-06-01, 10}
{2009-06-02, 15}
{2009-06-03, 20}
{2009-06-04, 50}
{2009-06-05, 80}
{2009-06-06, 110}
Yes, I can write software that does this. I am just hoping that someone already has a "ready to run" software (Excel) feature for this (rather generic) problem.
I came across this and was reluctant to use an add-in because it makes it tough to share the sheet with people who don't have the add-in installed.
My officemate designed a clean formula that is relatively compact (at the expensive of using a bit of magic).
Things to note:
The formula works by:
using the MATCH function to find the row in the inputs range just before the value being searched for (e.g. 3 is the value just before 3.5)
using OFFSETs to select the square of that line and the next (in light purple)
using FORECAST to build a linear interpolation using just those two points, and getting the result
This formula cannot do extrapolations; make sure that your search value is between the endpoints (I do this in the example below by having extreme values).
Not sure if this is too complicated for folks; but it had the benefit of being very portable (and simpler than many alternate solutions).
If you want to copy-paste the formula, it is:
=FORECAST(F3,OFFSET(inputs,MATCH(F3,inputs)-1,1,2,1),OFFSET(inputs,MATCH(F3,inputs)-1,0,2,1
(inputs being a named range)
There are two functions, LINEST and TREND, that you can try to see which gives you the better results. They both take sets of known Xs and Ys along with a new X value, and calculate a new Y value. The difference is that LINEST does a simple linear regression, while TREND will first try to find a curve that fits your data before doing the regression.
The easiest way to do it probably is as follows:
Download Excel add-on here: XlXtrFun™ Extra Functions for Microsoft Excel
Use function intepolate().
=Interpolate($A$1:$A$3,$B$1:$B$3,D1,FALSE,FALSE)
Columns A and B should contain your input, and column G should contain all your date values. Formula goes into the column E.
A nice graphical way to see how well your interpolated results fit:
Take your date,value pairs and graph them using the XY chart in Excel (not the Line chart). Right-click on the resulting line on the graph and click 'Add trendline'. There are lots of different options to choose which type of curve fitting is used. Then you can go to the properties of the newly created trendline and display the equation and the R-squared value.
Make sure that when you format the trendline Equation label, you set the numerical format to have a high degree of precision, so that all of the significant digits of the equation constants are displayed.
The answer above by YGA doesn't handle end of range cases where the desired X value is the same as the reference range's X value. Using the example given by YGA, the excel formula would return #DIV/0! error if an interpolated value at 9999 was asked for. This is obviously part of the reason why YGA added the extreme endpoints of 9999 and -9999 to the input data range, and then assumes that all forecasted values are between these two numbers. If such padding is undesired or not possible, another way to avoid a #DIV/0! error is to check for an exact input value match using the following formula:
=IF(ISNA(MATCH(F3,inputs,0)),FORECAST(F3,OFFSET(inputs,MATCH(F3,inputs)-1,1,2,1),OFFSET(inputs,MATCH(F3,inputs)-1,0,2,1)),OFFSET(inputs,MATCH(F3,inputs)-1,1,1,1))
where F3 is the value where interpolated results are wanted.
Note: I would have just added this as a comment to the original YGA post, but I don't have enough reputation points yet.
alternatively.
=INDEX(yVals,MATCH(J7,xVals,1))+(J7-MATCH(J7,xVals,1))*(INDEX(yVals,MATCH(J7,xVals,1)+1)-INDEX(yVals,MATCH(J7,xVals,1)))/(INDEX(xVals,MATCH(J7,xVals,1)+1)-MATCH(J7,xVals,1))
where j7 is the x value.
xvals is range of x values
yvals is range of y values
easier to put this into code.
You can find out which formula fits best your data, using Excel's "trend line" feature. Using that formula, you can calculate y for any x
Create linear scatter (XY) for it (Insert => Scatter);
Create Polynominal or Moving Average trend line, check "Display Equation on
chart" (right-click on series => Add Trend Line);
Copy the equation into cell and replace x's with your desired x value
On screenshot below A12:A16 holds x's, B12:B16 holds y's, and C12 contains formula that calculates y for any x.
I first posted an answer here, but later found this question

Resources