MS-Excel: Calculate Address Range for SUM function - excel-formula

Define Excel's cell P1 =494 an integer: the integer represents index of the final row of a table.
Goal: calculate the sum from the K column: =SUM(columnK,row2 : ColumnK rowP1). The idea is that if cell P1 s update from 494 to 508, the sum of the column K will change from 494th to 508th row.

INDIRECT() function:
Reference: https://www.exceltip.com/summing/summing-values-in-a-range-specified-by-indirect-cell-references.html

Related

returning highest value with vlookup function

i have this kind of dataset and i have to fill the "tot depth" column taking the highest value from each progressive (col K).
i've tried with ==VLOOKUP(N2,K1:L13841,2,0) but it gives me back the lowest value of the "P1" entry (-0.22).
the result i need would be :
Progressiva Tot depth
P1 -1.15
P2 -1.15
P3 -1.67
If you do not have MINIFS, you might try this in cell O2:
=MIN(INDIRECT("L"&MATCH(N2,K:K,0)&":L"&IF(N3="",COUNTAK:K),MATCH(N3,K:K,0)-1)))
And drag it to the end of the list. It will work as long as:
K column contains only the uninterrupted list of "progressiva" values;
H column contains the uninterrupted complete list of single occurences of "progressiva" value;
both column K and column N are sorted in the same way.

Pivot table generating custom value by comparing the 2 column's

I have below table.
Identity_No Date1 Date2
123 1/6/2018
456 4/7/2018 8/8/2018
567 10/10/2018 6/12/2018
now i need to generate a table like below
Identity_No 1/6/2018 4/7/2018 8/8/2018 10/10/2018 6/12/2018
123 y n n n n
456 n y y n n
567 n n n y y
please let me know how to create it with pivot function or any other option.
you can achieve this with combination of formulas(if your data structure is as presented). If your values are in range A1:C4, please enter this formula in cell G1 and drag it to the right. You must enter this formula with CTRL+SHIFT+ENTER combination since it is an array formula.
=NUMBERVALUE(INDIRECT(TEXT(MIN(IF(($B$2:$D$9<>"")*(COUNTIF($F$1:F1,$B$2:$D$9)=0),ROW(2:9)*100+COLUMN($B:$D),7^8)),"R0C00"),)&"")
This way you will extract unique dates from your range of dates in B:C columns.
then in cell f2 enter formula =A2 and drag it to the bottom. In cell G2 enter this formula =IF(IFNA(MATCH(G$1,$B2:$E2,0),"n")="n","n","y") and drag it beneath whole table.

How to get weighted sum depending on multipliers in column in Excel?

I have the table in Excel:
In column C (Sum) I want to get sum this way:
If in column A or B value is 1 then take Amount 48 and multiply by Multiplier (1) = 2.
If in column A or B value is 0 then take Amount 48 and multiply by Multiplier (0) = 1,5.
Then K1 and K2 summed.
So for row 2 the result in column C will be: 48*2 + 48*2 = 192.
For row 5 the result in column C will be: 48*1,5 + 48*2 = 168.
Is it possible to automate this process using Excel formula for C column (inspite of number of columns)?
Or you could use Countif (no shorter though)
=COUNTIF(A2:D2,0)*I$2*I$1+COUNTIF(A2:D2,1)*I$3*I$1
Use Ctrl+Alt+Enter when entering (since it's an array formula)
EDIT: I'm not great with formulas, so there is I'm sure a shorter alernative...

Large function with dynamic k value

I have a table with name and dept and salary column say A1 to C10...
Now I have to provide a name in col H, Dept in Col G and the Salary column will contain Top value (say if I give 2 in salary column, then it means based on above condition calculate sum of top 2 salary).
I used Large for the condition and Row(indirect("")) for salary but indirect takes the range (1:10) and not the number like 2.
How to achieve this
If you just want top salaries where top number say 2 is entered in a cell then try following formula:
=SUMPRODUCT(LARGE(C2:C11,ROW(INDIRECT("1:"&$E$2))))
Enter top value in Cell E2 as shown below:

In Excel what is equivalent function of table function in R

For example I have a cell:
A
B
B
A
C
I want to have a summary of total count of each character:
A 2
B 2
C 1
How can I do this in Excel?
Insert > PivotTable
Select your column as the row field and as the value field. Change the value field calculation from sum to count if it defaults to sum.

Resources