how do I convert a negative number into a positive one? - google-sheets

I want to show positive movement in numbers. In my case moving from 4 to 3 is positive movement.
In my Google Sheets, I have 4 in cell B1 and 3 in C1. The percent change value is 1 and percent change is 33% improvement. If I use this formula =(b1-a1)/b1 I get -33%. What formula do I use to get 33% as the returned percent?

Try using ABS() function. Something like this:
ABS((b1-a1)/b1)

try like this:
=((B1-A1)/B1)*-1

Related

Highlight 5 lowest values in a column that are not zero

I am using the following custom formula in conditional formatting to try and highlight the 5 lowest values in column B. However, I would like it to exclude zero values from the data. How do I highlight the lowest 5 values that are greater than zero?
=$B1<=SMALL($B$1:$B$100,$E$2)
Thank you!
https://docs.google.com/spreadsheets/d/1K-dsv3bB1qF-zhPR1XtciHmQAdOMuzrUJU4SlXz5e08/edit?usp=sharing
You can filter out the zeros before using SMALL, like this:
=AND($B1,$B1<=SMALL(FILTER($B$1:$B$100,$B$1:$B$100),$E$2))
Just an alternative added in this tab here:
highest
=xmatch($B1,sortn(filter($B:$B,$B:$B<>0),$E$1,,1,))
lowest
=xmatch($B1,sortn(filter($B:$B,$B:$B<>0),$E$2,,1,1))

Google sheet average function results the wrong average value

I am trying the average function to calculate the average of the number in column, but it gives the wrong result. All are numbers, I have also checked by applying ISNUMER() function.
below is the screenshot
Actual average value of A1 to A3 should be 60074.67, but average function gives different result.
What is wrong in my function?
Seems like you are only calculating the average of cells A1 and A3.
For the whole range try
=AVERAGE(A1:A3)
and see if that helps?

How to get average for last N rows with specific formula

I would like to calculate an average and this is my current formula
=iferror(iferror(AVERAGE(AVERAGEIF(B$2:B2156,B2157,D$2:D2156),AVERAGEIF(C$2:C2156,B2157,E$2:E2156)),AVERAGEIF(C$2:C2156,B2157,E$2:E2156)),AVERAGEIF(B$2:B2156,B2157,D$2:D2156))
This will calculate average between all cells up to 2156 but I would like to give me average only for last 10 hits. I tried with adding offset but I'm not sure where exactly to put it
Here is an example of my sheet
So I would like to get always the average of last 10 games for a home team.
You may use indirect & max method to average Last N row to solve your proble:
=average(INDIRECT("C"&max(0,count(C:C)-9)&":C"&max(0,count(C:C))))
Result:

Creating a Total Amount Minus Percentage Forumla

Can someone help me fix this formula so i can get the total? Here is the problem:
=sum(K10:K29)-M15
So basically, Im looking for Cells K10:K29 total displayed on L3 Minus M15 which M15 is the user % input. So like in math it would look like $1,230- 14% = ‭$1,057.8‬. Please and thank you, Im working on a project that needs that formula to work.
The formula in L3 should be:
=K9*(1-M15)
Because that way you are actually substracting between percentages (100%-User%).
What you are after is the remainder of the percentage (in your example 100%-14%=86%) so the formula to use is =sum(K10:K29)*(1-M15).
Your problem is in the math part. The percent is just that, a ratio. You need to multiply the ratio with the amount to reach the value you're after, e.g. 14% equals the value 0.14. However, multiplying it with 1,230 gives you 14% of 1,230 (172.2) which is presumably what you want to deduct.
I think this must be due to many calculators allowing for exactly the shortcut you're trying to do despite being mathematically dubious. This to make calculations simpler in shops.

Nested Average(Small(offset)) in Sheets isn't producing correct result

I want to calculate the average of the smallest 20 numbers in a range (using offset), then multiply it by 0.96 using a Google sheet.
This is the formula we have:
=AVERAGE(SMALL(OFFSET(B13,2,0,20),{1;2;3;4;5;6;7;8;9;10}))*0.96
(See below for pictures)
The function should output 24, but instead it's outputting 14. I think it has something to do with the range of numbers for 'n' in the nested 'small' function, but for the life of me I can't figure out what it is. I've linked some pictures:
Thank you!
Since the data in your image only has 20 rows, i am assuming you mean to calculate average of smallest 10 numbers from the 20 rows. Try this formula
=AVERAGE(SMALL(OFFSET(B13,0,0,20,1),{1,2,3,4,5,6,7,8,9,10}))
Please note the the formula should be entered as an array i,.e. type the formula and press Ctrl + shift + enter

Resources