Transpositioning and matching values - excel

Is there any formula or built in tool in Excel to make such a thing?
I have table:
| A | B | C |
1 | nam1 | val1 | val2 |
2 | nam2 | val3 | val4 |
3 | nam3 | val5 | val6 |
I want this to look like that:
1 | val1 | nam1
2 | val2 | nam1
3 | val3 | nam2
4 | val4 | nam2
I want to assign names to values with should be in rows.

I guess getting someone to write formulae for you counts as easier! Assuming a layout as shown I suggest two formulae because one column repeats a column and another column lists a matrix (which I have extended with two further columns in view of your Comment). Applying OFFSET as suggested by #Jeeped:
In Row 1 (in the example ColumnG) and copied down to suit:
=OFFSET($B$1,INT((ROW()-1)/4),MOD(ROW()-1,4))
In H1 and copied down to suit:
=OFFSET($A$1,INT((ROW()-1)/4),0)
The row numbers of the formulae are used to calculate the appropriate offsets for rows and columns relative to the reference cells.

Related

Combining rows of a table using similar cells of one of its columns in Excel

I have a table (1) in Excel, with two columns, in which at the first column (A) there are some numbers and at the second column (B) there are some letters. I want to have a method to make another table (2) from (1) to put different letters at the first column then to put in each row the numbers that were corresponded to letters in table (1).
For example, let the table (1) is:
| A | B |
|---|---|
| 1 | a |
| 1 | b |
| 2 | a |
| 2 | c |
| 3 | b |
| 4 | b |
What is a method in Excel which make the following combination table:
| a | 1 | 2 | |
| b | 1 | 3 | 4 |
| c | 2 | | |
in which letters are in first column and in each row there are the numbers that were in relationship with the row's letter in table (1)?
As per below screenshot use below formula to C1 cell.
=UNIQUE(B1:B6)
And following formula to D2 cell then drag down
=TRANSPOSE(UNIQUE(FILTER($A$1:$A$6,$B$1:$B$6=C1)))

Rank with condition

I'm searching for a formula which could rank a value from a subset of a range.
Let's say Col.A is Departement and Col.B is value.
I want a formula which can rank the value from all the other value of this departement.
I have tried things
{=rank(value,if(myrange=condition,myrange),0)}
Does not work.
I have managed to do the oposite - retrieving the value of a certain rank with :
{=small(if(myrange=condition,myrange),rank i want)}
I don't understand why my first formula fail.
Excpected result would be the rank of the value from it's subset of value which is all cells where the condition is true.
For such scenarios (ranking a subset of data), I find using SUMPRODUCT much easier:
=SUMPRODUCT(($A$2:$A$12=A2)*(B2<$B$2:$B$12))+1
This is for descending order. Result:
Although Excel has a RANK function, there is no RANKIF function to
perform a conditional rank. However, you can easily create a
conditional RANK with the COUNTIFS function. Exceljet
Some sample data:
| Dep | Val |
|-----|-----|
| A | 5 |
| A | 3 |
| A | 6 |
| A | 6 |
| B | 3 |
| B | 8 |
| B | 2 |
| C | 9 |
| C | 5 |
| C | 7 |
Let's put the COUNTIFS in there:
Formula in C2 for descending:
=COUNTIFS($A$2:$A$11,A2,$B$2:$B$11,">"&B2)+1
Formula in D2 for ascending:
=COUNTIFS($A$2:$A$11,A2,$B$2:$B$11,"<"&B2)+1
Drag both down....

Vlookup doesnt read mixture of Alphabet and Numbers eg: 1T902462K01

i have a table as below and i wanted to compare result using Vlookup.
A | B | C
-------------------------
1 | ID | Name | Lot
-------------------------
2 | 70100 | Krenn | VF849062
-------------------------
3 | 70101 | Georg | VE803354
-------------------------
4 | 70102 | Mohd | VE803354
However =VLOOKUP(C2,A1:C4,1,FALSE) will result #N/A
Any advise?
Regards,
Zaiem
Try the Index/Match suggested in the comments. It goes like this:
=index(A1:A4,match(F1,C1:C4,0))
in words: find the value of F1 in the range C1 to C4 and return the value from column A for the same row.
Your Vlookup formula references C2, which does not make sense if column C is the column where you perform the lookup.

Using openoffice Calc or Excel to find variables which occur in multiple columns?

I need a way to check if a variable occurs in all of my columns at least once.
Example with 3 columns, while Occu in Col1-3 checks if the variable which is listed in Col3 exists in every other column. Only for a the formula should return "true".
How can I achieve this? I tried using "countif" but unfortunately this only works for a maximum of 2 columns.
+------+------+------+----------------+
| Col1 | Col2 | Col3 | Occu in Col1-3 |
+------+------+------+----------------+
| a | a | f | false |
| b | c | a | true |
| c | d | e | false |
+------+------+------+----------------+
Any help is upvoted, thanks
Multiply another COUNTIF statement for each column:
=COUNTIF(A$1:A$3,"=" & C1) * COUNTIF(B$1:B$3,"=" & C1)

Excel difference between two columns

I have this question that puzzles me. Two columns of unique text entries in a worksheet all having a number next to each of them.
How can I compare the values for each pair of text and find the ones where the associated numbers are NOT the same.
Not even sure how the output would be. Maybe using Conditional Formatting highlighting the value in the first column where the match in the second one is different???
Thank you for your time.
Let's have some sample table.
+-----+---+-------+---+------------------------------------+
| A | B | C | D | =VLOOKUP(C1;ALL_VALUES;2;FALSE)=D1 |
+-----+---+-------+---+------------------------------------+
| abc | 1 | fasfa | 4 | #N/A |
+-----+---+-------+---+------------------------------------+
| aa | 2 | abc | 1 | TRUE |
+-----+---+-------+---+------------------------------------+
| dd | 3 | dd | 2 | FALSE |
+-----+---+-------+---+------------------------------------+
Where ALL_VALUES is named range of you table (here A1:D3). Formula returns TRUE when match is found, else it return False Or #N/A(You can transform #N/A by IfError function). Then you can filter the result in table based on this or you conditional formatting... Depends on what suits you better ;)

Resources