Excel Bring back Unique Record and description - excel

I have a table in excel that I am bringing in from Access.
I can get a unique Name from the list, but I don't know how to bring the description in the format below.
This is how the table in excel looks like:
Name Description
John Black
John Blue
John Black
Mary Green
Mary Blue
Jim Yellow
Jim Yellow
Jim Black
I want it to look like this so I'll have two field name and description will be both unique
Name Description
John Black, Blue
Mary Green, Blue
Jim Yellow, Black
thanks!

First Remove Duplicates. If Name is in A1, in C2:
=IF(A1=A2,C1&", "&B2,B2)
in D2:
=A2=A3
Copy both down to suit. Select all, Copy, Paste Special, Values over the top, filter on ColumnD to select TRUE, delete selection, delete ColumnD and ColumnB.

Related

Selecting rows of a table from a column of another table

I have a column in "table1.xlsx" with more than 200 IDs.
ID
21321
54646
48949
...
And another "table2.xlsx" with the IDs plus all the information about the people.
Name Surname ID City
John Wayne 54646 Madrid
Mary Jane 11111 Berlin
Julius Randle 21321 Rome
Peter Parker 48949 New York
I would like to extract the rows from "table2" that match with the IDs from "table1". There is an easy way?
"table3.xlsx"
Name Surname ID City
John Wayne 54646 Madrid
Julius Randle 21321 Rome
Peter Parker 48949 New York
Open table1.xlsx, table2.xlsx and table3.xlsx in Excel.
Go to Table1.xlsx. Select column A by clicking on A. Above that Column, you will see a box where cell number typically shows up. Click inside that and type in MyIDs.
Go to table2.xlsx. Create a new field called Matching IDs like so:
In Cell E2, type the formula:
=VLOOKUP(C2, table1.xlsx!MyIDs, 1, FALSE)
Hit enter. This formula means, take C2 (from table2) and find a matching row in table1.xlsx's named table called MyIDs (which is column A of table1). Then, choose the 1st column (which is the only column) from MyIDs. FALSE means do an exact match not an approximate match.
Click on E2. Copy it. Paste it into E3..En. You can drag to copy as well. That'll populate the formula in each cell in E column like this:
Click on sort and filter like this:
Click on Matching IDs dropdown and de-select #N/A
Highlight all rows and cells from the filtered data like so:
Copy. Go to table3.xlsx. Paste. Remove the extra column called Matching IDs at the end in table3.xlsx

How to find and replace all the words in a cell with a new word in excel

I have a huge data set in excel. I have a column with list of certain information about fruits and Im trying to replace all the cells with BA and BSC in column A with a new word fruits as given below in column B in excel. any new suggestions will be appreciated.
example
A B
KFC34R BA red and yellow fruits
KFC34R BSC red and yellow fruits
KFC34R BA red and yellow fruits
Try =SUBSTITUTE(SUBSTITUTE(A1, "BA", B1), "BSC", B1))

Count of unique values in multiple columns

What I need is probably best described in an example. It's a bit different from the group functionality and also the PivotTable in Excel, because I want it to show up in the data row itself (and not off to the side or below, etc.). Given a table like:
Fruit Color Farmer
Banana Yellow Smith
Banana Yellow Smith
Apple Yellow James
Apple Yellow James
Apple Green Smith
Banana Yellow James
I want to take the first two columns and give the count of rows that have the same values (regardless of the values in the other columns). So for my example, I would get:
Fruit Color Count Farmer
Banana Yellow 3 Smith
Banana Yellow 3 Smith
Apple Yellow 2 James
Apple Yellow 2 James
Apple Green 1 Smith
Banana Yellow 3 James
My preference would be an Excel formula (or even a built in function) as opposed to VBA.
Assuming Fruit is in A1, please try in C2 (having made room for it):
=COUNTIFS(A:A,A2,B:B,B2)
and copy down to suit.

How can I concatenate values in an Excel pivot, as opposed to summing or counting

Say I have the following data:
Col1 Col2
------------
Bob Green
Bob Green
Bob Green
Chris Blue
Chris Blue
Chris Red
Dave Blue
Dave Green
Dave Red
A default Pivot Table in Excel would yield:
Col1 Col2
------------
Bob Green
Chris Blue
Red
Dave Blue
Green
Red
Is there any way to concatenate on Col2 (specifically, with separators), so I end up with this?:
Col1 Col2
------------
Bob Green
Chris Blue,Red
Dave Blue,Green,Red
What you want is not possible from a PivotTable. However, if Bob is in A2 a formula in C2 like:
=IF(A1=A2,C1&", "&B2,B2)
and another in D2 of:
=A2=A3
both copied down to suit, may serve if you "fill in the gaps" (either in the PT or with Go To Special, Blanks, =, Up, Ctrl+Enter) then select all, Copy, Paste Special, Values over the top and filter to delete rows showing TRUE.
TEXTJOIN is now available on some versions.

How to vlookup a combination of cells?

There are two tables
table1
team member income
blue 650
Kate 500
Niki 150
green 1100
Kate 560
Alison 600
table2
team member income
blue 'vlookup what formula should I put here ?
Mike 'vlookup what formula should I put here ?
Kate 'vlookup what formula should I put here ?
Pete 'vlookup what formula should I put here ?
Niki 'vlookup what formula should I put here ?
red
Stew
Mark ............
Alex
green
Kate
Alison
I need to vlookup income from table1 and put in table2. The problem is that teams could have people with the same names . A record is uniquely identified by a team and a person name . How can i do this ?
With the layout shown you could try filling down this formula from G2:
=SUMPRODUCT((LOOKUP(ROW(A$2:A$7),ROW(A$2:A$7)/(A$2:A$7<>""),A$2:A$7)=LOOKUP("α",E$2:E2))*(B$2:B$7=F2)*C$2:C$7)
For convenience, you can create "helper" columns (which you can hide from view if needed):
Formulas:
C3: =IF(A3<>"",A3,C2)
D3: =IF(B3<>"",B3,A3)
E3: =C3&D3
Similarly for columns J, K and L. Formula in M3: =VLOOKUP($L3,$E$3:$F$14,2,FALSE) - a regular VLOOKUP.

Resources