How to populate columns using values from multiple rows of another sheet (Excel) - excel

I'm not sure what to search for this.
Basically, say I have a sheet that looks like this:
A | apple | 1
A | aardvark | 1
A | alternate | 3
B | bear | 2
B | banana | 4
C | candy | 3
C | carnivore | 2
and I want to copy values into another sheet so that it looks like this:
A | apple | 1 | aardvark | 1 | alternate | 3
B | bear | 2 | banana | 4 | |
C | candy | 3 | carnivore | 2 | |
I know there's the lookup function, but I'm not sure how to make it select the first, second, third etc. instance of what's being referenced.
Thanks in advance for any help.

For the screenshot below, use the following formulas:
E2: =IFERROR(INDEX($A$1:$A$8,MATCH(E1,$A$1:$A$8,0)+COUNTIF($A$1:$A$8,E1)),"")
F2:
=IF(INT(COLUMNS($F$1:F$1)/2)<COUNTIF($A$2:$A$8,$E2),INDEX($B$2:$B$8,MATCH($E2,$A$2:$A$8,0)+INT(COLUMNS($F$1:F$1)/2)),"")
G2:
=IF(INT(COLUMNS($G$1:G$1)/2)<COUNTIF($A$2:$A$8,$E2),INDEX($C$2:$C$8,MATCH($E2,$A$2:$A$8,0)+INT(COLUMNS($G$1:G$1)/2)),"")
Select F2 and G2, and fill to the right as far as you need, then fill the entire table down as far as you need.

Related

Concatenate values based in 2 cell values

I want to obtain a summary of the units of each class per group, but I don't know how to do it. I tried different options but this is breaking my mind and I prefer not to use a macro, just a formula.
This is an example of what I want:
Class | Group | Units | Summary
------|-------|-------|---------
A | G1 | 1 |
A | G1 | 2 |
A | G1 | 3 |
B | G1 | 4 | A:"1,2,3";B:"4"
B | G2 | 5 |
C | G2 | 6 |
C | G2 | 7 | B:"5";C:"6,7"
C | G3 | 8 |
A | G3 | 9 | C:"8";A:"9"
A | G4 | 0 | A:"0"
If you know how to help I would appreciate that.
Just as #bzimor said - use pivot table. The source is your original table (class, group and units). Then when the pivot table placeholder appears, you put Group, Class and Units in the Column fields. The result looks like this:
Of course, you can format the pivot table to look like you want it.

Create Distinct ID by Group in Excel without sorting

I have an Excel column that cannot be sorted and for which I need to create a unique id by group, similar to what is below:
+--------+------+
| Name | ID |
+--------+------+
| Jim | 1 |
| Sarah | 1 |
| Tim | 1 |
| Jim | 2 |
| Rachel | 1 |
| Sarah | 2 |
| Jim | 3 |
| Sarah | 3 |
| Rachel | 2 |
| Tim | 2 |
+--------+------+
You can do this with a simple COUNTIF() and getting a little creative with your cell references:
=COUNTIF($A$1:$A1, A2) + 1
Put that in B2 (assuming your list with headers starts in A1) and then copy down.
COUNTIF() here is counting the number of times the name in the adjacent cell has appears in all of the cells above it. As you copy it down, that range will grow to include all cells between A1 and the next row up.

Compare unique values with multiple columns and return the most recent

--------------------------------------------------
| X | A | B | C | D |
--------------------------------------------------
| 1 | Fruit | List | Date | Condition |
--------------------------------------------------
| 2 | Banana | Banana | 02/05/2010 | Good |
--------------------------------------------------
| 3 | Tomato | Banana | 02/05/2014 | Excellent |
--------------------------------------------------
| 4 | Orange | Banana | 02/05/2011 | Bad |
--------------------------------------------------
I would like to compare one-by-one the items in column A with column B, then return what's in column D for the most recent date in column C for that item.
E.g.: For "Banana" (A2) - Result = Excellent
I tried some INDEX with MATCH, but I can't get the correspondent MAX value.
Thanks
This is an array formula. Enter it in E2 by holding down ctrl-shift while hitting enter. Excel will put curly braces {...} around the formula:
=IF(COUNTIF(List,A2),INDEX(Condition,MATCH(MAX((A2=List)*Date),(A2=List)*Date,0)),"")
List, Condition, and Date are named ranges corresponding to the appropriate columns. eg: B2:b7, C2:c7, D2:d7.
This screenshot is based on your original post, as edited by me before you edited it your way:

Kind of group by in Excel without VBA

I need another transformation help in Excel
| A | B |
---| ----|--------|
1 | ID | Course |
2 | 1 | A1 |
3 | 1 | A2 |
4 | 2 | A1 |
5 | 3 | A2 |
I want to have a kind of group by, i.e.
| A | B | C |D | ...
---| ----|---------|---------|---------|----
1 | ID | Course1 | Course2 | Course3 | ...
2 | 1 | A1 | A2 | | ...
3 | 2 | A1 | | | ...
4 | 3 | A2 | | | ...
Any ideas? Is it possible without VBA macro?
I believe that the following link on removing duplicates from column would suit your needs (in your case you would do it horizontally).
http://www.get-digital-help.com/2009/03/30/how-to-extract-a-unique-list-and-the-duplicates-in-excel-from-one-column/
Per your reply to Robert, if you want to do it without VBA, try this... Select all cells in the first column. Copy and paste them into the first column of another worksheet. Use Excel's Remove Duplicates function on the pasted data. Then use INDEX functions in the columns to the right in order to pull the first, second, etc values matching that first column value.

How to find the match between text that typo in Excel?

I have two columns of data with an hundred names on and I need to find the matches.
The problem is when names on the second column are not exactly the same as the first column. Its hard to match them with a hundred names.
Is there any formula in excel for at least give tolerance with the data like "Setyadi" with "Setiadi", or "Tak Jelan" with "Tak Lejan".
Thanks for the solution, it works, I edited this because I want to ask more,
I have another problem, could you help me again?
I have a data like this, I want to fill column C with a number according to match the name in column D with column A. The other problem is, I want to match the name that only in a group that mentioned in column E, even not in the same row.
From
A | B | c | D | E |
Setyadi | 1 | | Setiadi | 11 |
Tak Jelan | 2 | | Tak Lejan | 11 |
Gordon | 3 | | Herik | 12 |
Alex | 4 | | Goerdon | 12 |
Heri | 5 | | Alex | 12 |
Into
A | B | c | D | E |
Setyadi | 1 | 1 | Setiadi | 11 |
Tak Jelan | 2 | 2 | Tak Lejan | 11 |
Gordon | 3 | 5 | Herik | 12 |
Alex | 4 | 3 | Goerdon | 12 |
Heri | 5 | 4 | Alex | 12 |
What I need is, how can we compare the name in group that mentioned in column D, then We can automatically give the number in column C that coupling from column B.
Thanks in advance
You can use something like John Walkenbach's SOUNDEX() function:
http://spreadsheetpage.com/index.php/tip/searching_using_soundex_codes/
Then put the code in Excel:
http://www.contextures.com/xlvba01.html
Now, if you had this data:
A | B
Setyadi | Setiadi
Tak Jelan | Tak Lejan
Now you want to add a formula in C1 like:
=SOUNDEX(A1)
And copy that formula to C2, D1, and D2.
Now take a look at your data:
A | B | SOUNDEX(ColumnA) | SOUNDEX(ColumnB)
Setyadi | Setiadi | S330 | S330
Tak Jelan | Tak Lejan | T245 | T242
Notice how Setyadi and Setiadi are exactly the same, that's because they sound the same, which is why the code from the SOUNDEX function comes back like this.
Now when you look at the Tak Jelan entry, you see that there is a difference of 3 (from T245 to T242). Now, what I would do is creat a new formula where if the first letter is the same, then pull out only the number and compare how close they are like:
=IF(LEFT(C1,1)=LEFT(D1,1),STDEV.P(MID(C1,2,3),MID(D1,2,3)))
Then you can compare the std deviation.

Resources