Find and add 1 to the highest number in column 2 based on the input in column 1 - excel

Using data similar to what's below, I want to fill in B7 with the next highest number that would be in associated with "Del"... the result should be "4". And then continue that in each subsequent row, the number that is returned in the associated cell in column B will be 1 higher than the highest number already associated with that string in A.
A B
1 Del 1
2 Del 2
3 Pho 1
4 Del 3
5 ACF 1
6 Pho 2
7 Del ____

In Column B, you can use =COUNTIF(A$1:A1,A1)
To explain the formula, we want to count from the first row to the current row any values that equal the current row's value.

Related

Formula to Find if Number between a Range in 2 Columns and then Offset 1 column

I would like to write an Excel formula that looks at 3 columns and grabs value of the 1st column based on if the search value is in columns 2 or columns 3.
1st Column 2nd Column 3rd Column
a 1 5
b 6 10
c 11 15
Search Value 1: 13 Result: c
Search Value 2: 6 Result: b
Try below formula-
=INDEX($A$1:$A$3,MAX(($B$1:$B$3<=B6)*($C$1:$C$3>=B6)*(ROW($A$1:$A$3))))

Formula for deviation from mean agreement

I have a dataset in Excel and I want to compute a formula for deviation from mean agreement.
Suppose the dataset is like this:
A B C D E
4 2 6 9
1 3 2
7 2 1
8 4 3
5 1 2
What I want to calculate has formula as (summation from i=1 to 5 (i.e., from A to E) |R-R'|/t)/N where N = 4 for 1st row, N = 3 for 2nd row and so on that is, no. of non null values for that row. R is current value in the row and R' is mean of the column for which we are considering R and t is no. of non null values in that vertical or column.
You will need to use the ABS() function to get the absolute value of the subtractions. To get the number of non-null cells you can use the COUNT() function. To only include items in a row that are not null you can use an IF() statement.
For example, if you data was in the range A1:E5 then the following formula would get the result for the first row if I've understood the calculation you are doing correctly:
=(IF(LEN(A1)>0,(ABS(A1-SUM(A$1:A$5))/COUNT(A$1:A$5)))+IF(LEN(B1)>0,(ABS(B1-SUM(B$1:B$5))/COUNT(B$1:B$5)))+IF(LEN(C1)>0,(ABS(C1-SUM(C$1:C$5))/COUNT(C$1:C$5)))+IF(LEN(D1)>0,(ABS(D1-SUM(D$1:D$5))/COUNT(D$1:D$5)))+IF(LEN(E1)>0,(ABS(E1-SUM(E$1:E$5))/COUNT(E$1:E$5))))/COUNT($A1:$E1)
Which results in 2.4853 for row 1

Look up for highest value from another column if values are equal excel

***1 2 3***
a 2 3
b 3 4
c 4 3
d 5 2
so I know to get the highest value I do
=INDEX(column1, MATCH(MAX(column3), column3, 0))
... which would give me 'b'
now I want to get the second highest value based on the column 3 but because there are two cells with 3 (which is the second highest value) I want to use the one that has the lowest value in column 2 based on those two rows. Is this possible?
Use a 'helper' column that adds column C + (column B ÷ 10) and use a modification of your original formula on that column.
        
The standard formula in F5 is,
=INDEX(A$2:A$5, MATCH(AGGREGATE(14, 6, D$2:D$5, ROW(1:1)), D$2:D$5, 0))
Fill down as necessary.

Find maximum of row, return column name

I have four rows and six columns of random numbers between 1 and 10. The headers atop are named A through F accordingly. I want to populate a range (A1:A6) on another sheet with the maximum number for each row. That is easy with the MAX function. However, in a another range (B1:B6), I want to put the column name to which this number belongs.
An HLOOKUP() won't work because a maximum value in one row is likely not unique number across the entire sheet. I am thinking a MATCH INDEX type function, but my understanding of those functions, especially in conjunction, is poor.
A B C D E F
1 0 2 10 9 8
9 3 7 6 9 10
10 3 0 2 1 4
9 4 7 8 6 3
Assuming your array is in Sheet1 and the columns are labelled, please try in another sheet, copied down to suit (to Row4 since there are only four rows of numbers in your data):
=INDEX(Sheet1!A$1:F$1,MATCH(MAX(Sheet1!A2:F2),Sheet1!A2:F2,0))
This will return only the first column label from a row where the maximum for that row occurs more than once.

Keep on summing corresponding cell and compare with first column for summing up first column based on comparision in excel

Consider the following data setup:
_A_ _B_ _C_
1 1
2 1 1
3 3
Such that a formula would return the following results for columns B and C respectively:
_A_ _B_ _C_
4 2
Now I want to sum column A if A-(B+C) is equal to 0.
so for above example sum would be 1+3 = 4 on column B, since row 1 and 3 satisfy 1-1=0 first row, 3-3=0 third row. so A value on 1st and 2nd row is 1+3=4. Row 2nd doesn't satisfy 2-1=1 not 0 so ignore.
on column C, B+C in second row 2-(1+1) = 0 ,So it would be sum 2 in that column C, ignoring first and third row since it already has been counted on column B.
columns continue like D E....
So sum up from B to current column..so if i am in column B it will sum up till B.If in C B+C....If in D B+C+D etc and then compare with column A
Insufficient rep to comment, this is at least a partial answer and perhaps full.
I think you're looking for this to happen in some lower row in B:
=SUMPRODUCT(--(A1:A3=B1:B3),A1:A3)
And this in C:
=SUMPRODUCT(--(A1:A3-(B1:B3+C1:C3)=0),A1:A3)
Although as EEM points out all the sample rows satisfy this condition so you get "6" instead of "2"

Resources