Match multiple columns in Excel - excel-formula

I want to match three different columns in different sheets in Excel.
In one sheet I have Group and Name, and in another I have Name and Email.
How do I match Name in Sheet 1 with Email in Sheet 2?
Sheet 1
Group Name
A John
B Jack
C Anne
Sheet 2
Name Email
John john#
Jack jack#
Anne anne#

In Sheet2 column C, add a Group with this formula copied and dragged down:
=INDEX(Sheet1!$A$2:$B$4,MATCH(A2,Sheet1!$B$2:$B$4,0),1)
See the pic above. This should give what you are looking for.

Related

How to copy a column from one sheet to another in MS- Excel, with ID as reference

I have 2 sheets in one excel file. I'd like to copy only the team column from sheet 2 to sheet 1. Both sheets have matching ID to relate to each other.
Sheet 1
id
name
address
team
123
Paul
1st street
456
Kyle
2nd Street
Sheet 2
id
name
team
123
Paul
CL
456
Kyle
BSM
And then sheet 1 will now look like this:
id
name
address
team
123
Paul
1st street
CL
456
Kyle
2nd Street
BSM
I don't know where to start. I know though that this can be done in excel, and you can do programming on it. I don't want to manually input it since it's more than a hundred records.
Okay so I am assuming all the headers are in first row. This can easily be done through Vlookup
=VLOOKUP(A2,Sheet2!A:C,3,FALSE)
Put this formula in column team in Sheet1. It will work.
Let me know if you need any further clarification.

How to compare two excel sheets list?

I have two sheets list both has the same data which is first name and last name. I want to know if list A has the same last name, and the first 3 character from first name from list B. I tried to use Vlookup function but I did not work. I want to match exact last name and exact three character from first name.
An example:
Worksheet 1
A B
1 John Smith
2 Jane Jones
3 Robert West
Worksheet 2
A B C
1 John Smith MATCH
2 Jane Jones MATCH
3 Bob West NO MATCH
In cell C1 on Worksheet 2 enter this formula as an array formula:
=IF(NOT(ISNA(MATCH(CONCATENATE(LEFT(A1,3),B1),CONCATENATE(LEFT(Sheet1!$A$1:$A$3,3),Sheet1!$B$1:$B$3),0))),"MATCH","NO MATCH")
Drag your formula down to include cells C2 and C3.
Notes
To enter as an array formula use CTRL + SHIFT + ENTER
Update the Left formula to match different numbers of characters in first name

How to link from one excel sheet to another using vlookup?

I have an excel workbook to track my online shop sales. There are two sheets: one for ‘Orders’ and the other for ‘Customers’. They are databases of my orders and clients, respectively. In the ‘Orders’ sheet one of the columns shows who the client is. I would like each customer in the ‘Orders’ sheet to link to the respective row of this customer in the ‘Customers’ sheet. Can I achieve this with VLOOKUP or something else?
Orders sheet
A B ...
Order number Customer
1 A. Smith
2 B. Browns
3 P. Williams
Customers sheet
A B ...
Customer name email
A. Smith a#smith.com
B. Browns b#browns.com
P. Williams p#williams.com
I tried this, but won't work:
=HYPERLINK(VLOOKUP(B2;Customers!A:A;1;FALSE), B2)
If you use the Insert : link and have the names defined on the customer sheet (use Insert : Name : Define name to make your names - they do not accept spaces), then clicking on it will take you to the name on the other sheet.
I had "A Smith" typed in cell B12 on sheet2 and named it "A_Smith" which then works as a clickable link.

match two columns in seperate sheets and add other two columns

I have 2 excel spreadsheets in a single excel file. Both of these files have a Campaign Name column and sum_revenues column
My first problem is that I want to match the Campaign Name column in both the sheets and if they match then I want to add the sum_revenues value in the 1st spreadsheet to sum_revenues in the 2nd spreadsheet
I know that sumif or sumifs will be used but I do not know how I can apply them.
The output should be the addition of sum_revenues column in both the sheets based on the Campaign name matching criteria in the sum_final column which is present on the 2nd sheet.
I hope I am clear about the question but please let me know if there is any confusion.
Below is how sheet 1, Sheet 2 looks like.
Sheet 1:
Campaign Name sum_revenues
ABC 40
DEF 60
Sheet 2:
Campaign Name sum_revenues sum_final
ABC 30 70
GHI 10 0
Now please note that in Sheet 2 in which I want to output is that sum_final column has the sum_revenues added up from both the sheets because ABC is present in both the sheets and it should show 0 for those which do not match.
Try:
=IFERROR(VLOOKUP(A2,Sheet1!$A$2:$B$3,2,FALSE),0)+B2
Sheet 2 Images:
Below formula may help you, assuming that your sheet1 data available in column A & B and sheet 2 data available in Column D & E and finally F would be the result.
Type the formula
sumif(e:e,d:d,a:a)+sumif(a:a,d:d,b:b) +e3

Excel macro/formula - replace cell values if value does NOT appear in another column

I need help. I have a list of 20 names of certain consultants. I receive a new sheet daily with many names, and if one of them does not match with any of the 20 consultant names, I need to replace the cell value with "X".
E.g.
1. Consultant's list contains John and Mary.
2. Daily list contains 5 names: John, Steve, Dean, Mary and Sue.
3. I now want to replace all the cell which does NOT contain John and Mary with X (thus replace cell with names Steve, Dean and Sue with X)
Help will be appreciated
If your 20-name list is in ColumnA and the daily list in ColumnB each starting in Row1 then in Row 1 and copied down to suit:
=IF(ISERROR(MATCH(B1,A:A,0)),"X",B1)

Resources