excel exclude a certain value from mode average - excel

I'm looking for a formula that can find the Mode Average from a range of cells but exclude the value 14 from the range
example
A1 =26
A2 =14
A3 =14
A4 =14
A5 =26
A6 =3
A7 =16
A8 =16
A9 =26
Result would be:26 and not 14

Array formulas to the rescue:
=MODE(IF(A1:A6 <> 14,A1:A6))
Enter it via Ctrl + Shft + Enter

Not very elegant, but it works:
=(SUM(C3:C11)-COUNTIF(C3:C11,14)*14)/(COUNT(C3:C11)-COUNTIF(C3:C11,14))
c3:c11 is the range I am looking at on my test sheet.
I am basically looking for the sum of all values in the considered range, subtract 14 times the occurence of the number 14 from this sum and then divide the result by the total number of cells minus the occurences of 14 again. The whole thing will look much nicer, if you have the luxury of another cell that could serve as the "14-counter".
Edit: I overlooked the word "mode" in the question. This answer will only compute the average ...

Related

if i put number 1 in cell C6 then -35 or if i put 2 in cell C6 then +35

I'm trying to add and minus the number from Cell E9 to display in Cell E8 e.g if i type number 1 in cell C6 then -35 or if i type number 2 in Cell C6 then +35 to the cell E9 to display in cell E8. Here is my formula below it works with number 1 but not with number 2.
=E9-IF(C6=1,35,IF(C6=2,+35))
Why does the formula don't work?
This should do the trick:
=E9-IF(C6=1,35,IF(C6=2,-35))
The issue is that your take - IF, so no matter what, both of your previous values would have get you a minus sign (- x + = -). (35 & +35 is the same)
There is a really good funcion in Excel "Evaluate Formula", that has step-to-step progress how the formula evaluate the calculation progress.
In our case you will see that the original formula would have progressed like this:
Original excel formula (typed 2 in C6):
0-IF(C6=1,35,IF(C6=2,35))
Next step, since cell C6 is 2, the first part of IF returns FALSE.
0-IF(FALSE,#N/A,IF(2=2,35))
Start evaluating next part (false part of IF, where 2=2 will be true)
0-IF(FALSE,#N/A,IF(TRUE,35))
The last part will give 35, but since you have minus:
0-IF(FALSE,#N/A,35)
You actually is arriving at the same number as the previous statement in the IF formula.
0-35
However,
if you set -35 in the last part IF(C6=2,-35) your final step will look like this:
0--35 -> 0+35

Matching cell from two values

need help here :) I am not excel expert
I have a simple spread sheet with some data and I need to find the matching values from another sheet. Some help would be appreciated.
The data looks like this:
d1 d2 d3 d4 d5
c1 1 5 4 4 3
c2 2 4 9 1 2
c3 4 4 7 8 4
c4 4 7 1 9 2
c5 4 4 7 6 8
So above c1, c2 etc. means Code's and d1, d2 etc. means Dates (future dates).
The numbers between I need to catch in a different spread sheet
example
Code: c2 - User provides the code
Date: d4 - User provides the date
Value: 1 - this value I need to get with formula
Should I attach example file if needed?
If possible to use performance wise formulas as might be quite few of them. Perhaps INDEX/MATCH? if I know how to use it :) but I think also INDEX/MATCH will slow it down a lot, I might be wrong also :)
thank you for your help in advance.
EDIT:
Added screenshot, might help also what is needed.
Assumptions / prerequisites:
Sheet1 cells (A1:F6) is your data / headers from your example
Sheet2 cell B3 is where the user types the code
Sheet2 cell B4 is where they type the date
Sheet2 cell B5 is where the value displays
this would be your formula in Sheet2 C5
=INDEX(Sheet1!A:F,MATCH(B3,Sheet1!$A:$A,0),MATCH(B4,Sheet1!1:1,0))

Excel horizontal list to columns

I am looking to format some data. To make it more easy I use an example with simple numbers.
Sheet 1 ('S1'):
A1 10
A2 14
A3 23
A4 12
A5 64
A6 32
.... etc
It is a long list(vertical) of 600 values
Now I want in Sheet 2('S2'):
To show it as:
S1!A1 S1!A2 S1!A3 S1!A4 S1!A5 S1!A6
S1!A7 S1!A8 S1!A9 S1!A10 S1!A11 S1!A12
S1!A13 S1!A14 S1!A15 S1!A16 S1!A17 S1!A18
References to the cells in the other sheet.
I have tried to transpose them but I cannot find a modifier to set an amount of columns used. i.e. I would get 1 row with all my data. I want only the first 6 in row, next 6 in next row, next 6... etc.
Thanks for any help/feedback given.
Put this in the upper left cell desired:
=INDEX(Sheet1!$A:$A,(ROW(1:1)-1)*6+COLUMN(A:A))
Then copy/drag over 6 columns and down till you finish the list
Sheet1

I am trying to find a formula that will allow me to calculate MAX/MIN without calculating anything after the current row

I want to use the Max/Min function to calculate the minimum number up to the current row, but not count anything after that row. See example below:
A B C
1 10 =MIN(A1:A1) I Want B1 to only count MIN from A1 to A1 from here, then
2 14 =MIN(A1:A2) from here I want B2 to count MIN from A1 to A2,
3 9 =MIN(A1:A3) Then A1 to A3,
4 6 =MIN(A1:A4) etc,
5 14 =MIN(A1:A5) etc.
I could go back and update each row manually, but I have over 700 rows that I want all this to apply to. Is there anyone who can help me with a solution to this problem?
Use this formula in B1, and copy downwards:
=MIN($A$1:$A1)
This is called maintaining referential integrity while writing any excel formula. It should give the desired result on copy towards right or downwards.

How do I link the content of a cell to another worksheet as opposed to the value?

I realize my title doesn't really explain what I'm asking as I don't know the correct terminology but bear with me and I'll explain my question.
I know how to link two cells so that if one changes, the other does as well (i.e. cell C3 is linked to cell E5 by selecting cell C3 and entering "=E5"). But how do I link the information in the cell to another cell?
If my worksheet looks like this:
cell B1 - Grapes, cell C1 - 50
cell B2 - Apples, cell C2 - 60
and I link cell F1 to cell C2 with "=C2". If I change the order of cell B1 and cell B2 to become alphabetical then cell F1 is no longer linked to the value in cell C2 (50) but changes to the value that now becomes cell C2 (60). How do I link cell F1 to the actual value (50) in cell C2 even if the order changes.
Help... Thank you!
Not sure if this is an efficient method; if i correctly understood your question then you can use = to link two cells For example:
Sheet one can look like this
A B C D E
1 1 2 3 4 5
2 5 4 3 2 1
3 1 2 3 4 5
Total 7 8 9 10 11
Sheet two requires cell links so you do:
TotalForA =Sheet1!A4 //output will be 7
TotalForB =Sheet1!B4 //output will be 8
.
.
.
In a simple word you can use = sign and click on whatever cell you're like to get.

Resources