microsoft excel index match row formula - excel-formula

How to make this table to this result with formula ?
sorry for my bad english.
thank's
enter image description here

You cannot achieve this with the help of formulas alone.
You can achieve this through VBA, please refer to a similar VBA code answered by FaneDuru here, https://stackoverflow.com/a/69107658/15446521.

Actually it can be done by formula in Office 365. Preferably using LET:
=LET(data,A2:E13,
rows,ROWS(data),
a,SORTBY(data,INDEX(data,,1),,INDEX(data,,2),),
b,INDEX(a,SEQUENCE(rows),SEQUENCE(1,2)),
c,INDEX(b,,2),
d,INDEX(a,,1),
x,IF(SEQUENCE(rows)=1,d,IF(d=INDEX(d,SEQUENCE(rows,,0)),"",d)),
y,IF(x<>"",c,IF(c=INDEX(c,SEQUENCE(rows,,0)),"",c)),
z,INDEX(a,SEQUENCE(rows),SEQUENCE(1,5)),
seq,SEQUENCE(1,columns(data)),
IFERROR(CHOOSE({1,2,3},x,y,z),z))
But this is a whole lot of work for what can be accomplished by a simple Pivot Table.
So advice 1: use Pivot Table
advice 2: use the VBA solution already answered
advice 3: use the formula solution above. Please note that not showing duplicate values only works for the first 2 columns

Related

Extract Specific Value from Cell in Excel

I have a work dilemma. I have some cells, too many to manual work, that have some combination of the below:
"grievance 01-11 filed 09/19/02"
I am hoping to get only the "01-11" or whatever combination of xx-xx from the cell. I have used =LEFT(R102,FIND("-",R102)-1), but it gives me everything before/after the dash.
Thank y'all for any assistance!
Use SEARCH:
=MID(R102,SEARCH("??-??",R102),5)

How this Excel Formula worked?

I'm using following formula to extract the records from the database in excel.
{=IFERROR(INDEX(A$2:A$11,SMALL(IF($A$2:$A$11=$C$1,ROW($A$2:$A$11)-ROW($A$2)+1),ROWS(E$2:E2))),"")}
I got this formula idea from the following YouTube tutorial,
https://www.youtube.com/watch?v=6jcqN3swdW8
Now my question is I want to understand the part of the Formula.
here is that,
"IF($A$2:$A$11=$C$1"
How did the above part work with excel formula? I have tried to use this part individually to return the boolean value from the table but it gives the wrong result every time.
anyone can clear my concept?
this is turned out to be a very easy concept. Thank you to #TomJohnRiddle for his comment.
I have started learning Advance Excel from VBA. I used to apply VBA literally for every little data processing. Maybe that's why I have never interacted with Excel's Array Formulas. but it's all cleared now
here is the link as Tom has suggested.
https://support.office.com/en-us/article/guidelines-and-examples-of-array-formulas-7d94a64e-3ff3-4686-9372-ecfd5caa57c7
Thank you.

Vlookup for differente sheets Excel

Good afternoon,
I am trying to use a VLOOKUP formula across different sheets, but so
far I am unsucessful.
The formula I am using is the one below:
VLOOKUP(R9;INDIRECT("'"&INDEX(ListaFolhas;MATCH(1;--(COUNTIF(INDIRECT("'"&ListaFolhas&"'!$C$4:$D$4");R9)>0);0))&"'!$C$4:$D$4");2;FALSE)
ListaFolhas is the name of the range of the names from the different
sheets.
Basically I need to insert the number associated with each person:
What can I be doing wrong? I used this formula from a page and adapted
to my own case...
EDIT:
After some research I figured out an answer. However, I am facing a new problem: The formula I found only considers one word, doesn't consider 2+ words. A screenshot of the situation:
In the image I have the formula I am using and the difference I get. Could anyone help me please? Thanks in advance!
=INDEX(range of cells with the numbers, MATCH(name you are looking for,ListaFolhas, 0))

Dynamically extract a list of unique values from a column range in Excel?

I found this example in an excel tutorial
The following image is my desired result. and the following formula is supposed to be able to extract the unique records dynamically. I know how to do this with VBA but i really want to make this a formula without using a macro.
=IFERROR(INDEX($B$2:$B$9, MATCH(0,COUNTIF($D$1:D1, $B$2:$B$9), 0)),"")
I have tried the above formula as given in the example link above but it returns with error. I am assuming that this worked at some point in excel however it no longer works with Excel 2016. Can someone clarify why this formula no longer works? Thank you.
Answering my own question about 5 minutes later, so i read the patch nodes on the how match changed from excel 2008 to 2016. You need to use the index rather than the count.
=IFERROR(INDEX($B$2:$B$9, MATCH(0,INDEX(COUNTIF($D$1:D1,$B$2:$B$9),0,0),0)),"0)),"")")
Recommended edit to the formula to change the value returned on error to a blank:
=IFERROR(INDEX($B$2:$B$9, MATCH(0,INDEX(COUNTIF($D$1:D1,$B$2:$B$9),0,0),0)),"")

Use a formula by Group in excel

I want to count how many games have past for a particular team to have as a game result a tie. I made a search and i found that for this reason i could use the Match() function, which i did and it worked. The problem is that i want to calculate this by team, and not by whole, as you will see at my linked file. I considered use Pivot table or subtotals but i didn't manage to find a workaround. Does anyone have something to suggest?
You can see the data here: https://drive.google.com/file/d/0B3_Yf9GS73seQ3FRdVhWX21LQ3c/view?usp=sharing
It's an xlsx file
Thank you in advance
Here is a solution, it should cover everything:
J2 formula:
=IF(E2="Tie",COUNTIFS($A$2:A2,A2)-1,0)
K2 formula:
=IF(J2=0,0,ROW(J2))
L2 formula:
=IF(AND(E2="Tie",E1="Tie"),0,IF(J2=0,1,IF(MAX($K1:K$2)>0,SUM(INDIRECT("L"&ROW(L1)&":L"&MAX($K1:K$2)+1)),COUNTIF($A$2:A2,A2)-1)))
It is artificial lookup, couldn't think of anything better.
Note: Sort by club name first to get accurate results!

Resources