I am trying to have Excel solve "X" for me.
(X-100)/X=60% or (X-100)/X=.6
The "100" data is the cell I will be changing as needed. Basically I am looking to input a number to replace "100" and be given the number that would equate to 60% GP of that number. I hope that makes sense.
Thank you
If the data and various cost values are like below,
Enter the below formula in cell A2 and drag down,
=B2/0.4
(X-100)/X=60% gets you X = 100 / 0.4.
You can just use the equation X = Cost / 0.4 and replace Cost with whatever number you need.
Related
I have 3 numbers in excel.
A1. 498
A2. 899
A3. 5209
I want the numbers as the followings:
B1. 49800
B2. 89900
B3. 52090
I am still finding the solutions via online but most of the resource is discussing about leading zeros.
Please, could you kindly give me any ideas? Thanks.
I hope this formula may be of some use:
=A1 & REPT("0"; 5 - LEN(A1))
Thought this does not set the format of the cell itself (which I doubt can be done as you are changing the value of the cell by adding the zeros)
The formula only works if you are dealing with numbers as text, so you may need to convert them to text in the formula (TEXT(A1; "0") instead of A1)
you can do this one quite easily without VBA - using an IF and the very handy REPT function:
=IF(LEN(H13)<5,H13&REPT(0,5-LEN(H13)),H13)
Essentially - if the length is less than 5 - you repeat 0 up to the amount of times that its missing.
Seems like simple math to me. Essentially you want to shift left (base 10) a certain number of times. We can do this by:
Calculate the ceiling of the base-10 logarithm of the value to get it's "length"
Subtract the result from the target "length" of 5, this is the number of places we want to shift
Take 10 to this power and multiply back by the value.
In other words, where x represents the value in column A you want to transform:
In Excel, this would be expressed as:
=A1*POWER(10,(5-CEILING(LOG10(A1),1)))
I need to sum the vehicle and max hr intersection set for each subsystem. In other words I need to sum value of TRUEs and print the sum in the 1st FALSE which is above these TRUEs.
For example:
D1 = B2
D3 = B4+B5+B6+B7
D8 = B9+B10+B11
This is a simplified version of my real requirement. There exist thousands of data in my file. I don't know VBA. I also don't know which functions to use in this case, if it's possible to solve this without VBA.
which function(s) should I try?
regards.
You can use something like that:
=IF(C1=FALSE;SUM(B2:B11)-SUM(D2:D11);"")
It sum ALL the number and subtract all the othr sum below...
Copy and paste for every cells. Make attention to NOT fix the cell ($) otherwise don't work...
It's NOT a very good solution, but work.
I have a range of numbers in a1:80. I want to count the total number of values in a1:a80 that fall between X and Y e.g.
Value X = 30000
value Y = 35000
cell a1 = 34000
cell a42 = 33000
Goal: The formula will tell me that there are 2(two) instances in a1:a80 that have a value between X and Y.
I've tried a variety of combos as below:
=COUNTIF(OR($A1:$A80,"<="&V4)$a1$a80,">="&V3)
and
=IF(OR(">="&V3,"<="&W3),"there are COUNT(1)","there are COUNT(0)")
Here's the video:
http://www.youtube.com/watch?v=SKKmlSENNLM
and here's the spreadsheet:
https://plus.google.com/116948076340592829238/posts/6dDtKuEebNm
Thank you for considering this problem worthy of your time.
You may use COUNTIFS, the multi-range, multi-criterion alternative to COUNTIF:
=COUNTIFS(A1:A80;">="&$V$3;A1:A80;"<="&$V$4)
I just solved the same problem in a very simple way, although it took me some time to think of it. Just count all cells that have a value below (either including or excluding) the upper border of the range and subtract the number of cells that have a value below (incl. or excl.) the lower border of the range. For example, if you want to count the cells that contain a value that would be rounded to 9.5.
=COUNTIF(F2:F82,"<9.75")-COUNTIF(F2:F82,"<9.25")
I got an answer from a friend
=SUMPRODUCT($A$1:$A$80>=12000,$A$1:$A$80<15199)
I modified is to use a value in the spreadsheet:
=SUMPRODUCT($A$1:$A$80>=U4,$A$1:$A$80<V4)
Lets say I have an Excel sheet such that:
Column 1 contains salaries
Column 2 contains gender (M/F)
How can I calculate the average salary for females?
=AVERAGE(IF(B1:B10="F",A1:A10))
entered as an array function (ie using Shift-CTRL-Enter rather than just Enter)
Allthough the answer is already answered/accepted I can't resist to add my 2 cents:
Sums and averages normally are displayed at the bottom of a list. You can use the SUBTOTAL() function to calculate sum and average and specify to include or exclude "hidden" values, i.e. values suppressed by a filter. So the solution could be:
create a formula =SUBTOTAL(101,A2:A6) for the average
create a formula =SUBTOTAL(109,A2:A6) for the sum
create an autofilter on the Gender column
Now, when you filter for "F", "M" or all, the correct sum and average will always be computed.
Hope that helps - Good luck
To do it without an array formula just use this:
=SUMIF(B:B,"F",A:A)/COUNTIF(B:B,"F")
Answered question, solid formulas - BUT - beware of conditional averages based on numbers:
In a very similar situation I tried:
"=AVERAGE(IF(F696:F824<0;E696:E824))" (shift control enter) - In English this asked Excel to calculate an average on all numbers in column E if a result in column F was negative (a loss) - e.g. "calculate an average for all items where a loss occured". (no circular reference)
When asked to calculate an average for all items where a gain (x>0) occured, Excel got it right. However, when the conditional average was based on a loss - Excel produced a huge error (7.53 instead of 28.27).
I then opened exactly the same document in Open Office, where Calc got the (correct) answer 28,27 from the same Array formula.
Recalculating the whole thing in steps in Excel (first new column of only losses, new for only gains, new column for only E-values where a loss/gain occured, then a "clean" (unconditional) average calculation, produced the correct values.
Thus, it should be noted that Excel and Open Office produce different answers (and Excel 2007, Swedish language version, gets them wrong) in some cases of conditional averages.
(sorry for my long cautionary tale - but be a bit careful when the condition is a number would be my advice)
You can put filter in top line of your sheet. Then Filter only Fs from Column2, then calculate average of values.
Or you can add additional column with female salaries only.
The formula would be like: =IF(B1 = "Female";A1)
Then you simply calculate average of newly created column.
Salaries gender
2500 M 0 2500*0
2400 F 1 2400×1
2300 F 1 2300×1
sum =2 sum=4700 average=4700/2
Maybe it be complex.
How can I use sigma with boundaries in excel 2007? For example I want to calculate this value:
sigma [e^(m-n)*i(m)]
in which n values are a column starting from 0 to 100 and for each n, m is started from 0 ended to n and i(m) is corresponding value specified in Raw m and form a column. For example for n=100:
sigma [e^(m-100)*i(m)] and m is 0 to 100.
Please don't tell to write for each raw separately and then sum up because for n=1 to 100 I should do this operation for each n, n times which leads to 1+2+3+...+100=100*101/2=5050 times.
#javad, your description is very difficult to follow e.g. "i(m) is corresponding value specified in Raw m and form a column"???
My guess: You want to tabulate the values of function F(n) for n=0,...,100. F(n) is defined as the sum over m=0,...,n of the expression e^(m-n)*i(m) -- where i(m) is some function of m. Abbreviate this as F(n) = sigma(0,n) of e^(m-n)*i(m)
Is that correct? Whether it's correct or not, please edit your question to provide a clear unambiguous description of what you want.
You should also manually calculate the first few values (say F(0) to F(3)) and publish those as well as i(0) to i(3) for use as test data.
You might also give an idea of what kind of precision you expect.
Here's a tentative start on a solution:
Firstly rewrite F(n) as (sigma(0,n) of e^m * i(m)) / e^n
Then fill in the cells like this:
a1: heading n, a2 to a5: 0,1,2,3
b1: heading i(n), b2 to b5: i(0), ..., i(3)
c1: heading e^n, c2: =exp(a2) and copy down
d1: heading i(n)*e^n, d2: =b2*c2 and copy down
e1: heading accum, e2: =d2, e3: =e2+d3 and copy down
f1: heading F1(n), f2: =e2/c2 and copy down
g1: heading F2(n), g2: =sum(d$2:d2)/c2 and copy down
F1(n) and F2(n) ate two slightly different ways of calculating your F(n). F2 looks very much like what you say you don't want ("Please don't tell to write for each raw separately and then sum up") -- you may like to explain why you think you don't want that, because (1) 5000 calculations is a trivially small number and (2) I've filled out the above table to n=100 and the recalculation time is not noticeable. You'll notice that the F2(n) doesn't use the clunky "accum" (running total) column.
Can you use SERIESSUM() to accomplish this?
For one-dimensional sums of series, you can use the Excel function
SUMPRODUCT( yourformulahere( ROW(1:100) ))
to generate the sigma from 1 to 100 of your arbitrary f(n).
ROW(1:100) expands to the series {1,2,...100}.
It sounds like you are doing a double summation here, though, with the inner dependent on the outer. This is left as an exercise for the reader. HTH.