Find Partial Matching data across two sheets - excel-formula

I have two excel sheets that I am working with. Sheet 1 has a 'last name' column D and sheet 2 has a 'name' column A. the 'name' column contains last,first name so I need a partial match option to find the customers last name in each sheet and create a new list using the information found in the 'name' column A from sheet 2 in another sheet. This may be simple but for someone who lacks in excel I would appreciate the help.

You could perform an INDEX MATCH function with wildcard search.
=INDEX(B:B,
MATCH("*"&D2&"*",Sheet2!A:A,0),1)
The match function will search for the partial string in cell D2. (Which would be a last name assuming D1 is the title of the column) - The "*"& part on either side of D2 searches for the partial string. If the column only contained last names, it would just be
=INDEX(B:B,
MATCH(D2,Sheet2!A:A,0),1)
After it searches for the partial string, it will search through column A in Sheet2 and find the name which matches (Lets hope you do not have duplicate names).
Once you have matched two names, in comes the INDEX function. This will obtain the corresponding value from any column you want but only in the same row as that last name.
If you want it all in another sheet, you could do.
=INDEX(Sheet1!B:B,
MATCH(Sheet1!"*"&D2&"*",Sheet2!A:A,0),1)
Maybe chuck in some error handling as well.
=IFNA(INDEX(Sheet1!B:B,
MATCH(Sheet1!"*"&D2&"*",Sheet2!A:A,0),1), "No Match or No Data")

Related

I want populate cell by looking up data in another sheet

I have an Excel workbook with 2 sheets.
I want to use Sheet 1 as the source to populate a column in Sheet 2.
Sheet 2, Column B has a list of resource names
Sheet 1, contains many of the same names in Column A, and a list of managers in Column F
I want to populate a separate column in Sheet 2 with the managers name from Sheet 1 based on matching the resource names.
I want to get a result of NOT FOUND if names don't match
I've tried
IFERROR(VLOOKUP(B8,'SHEET 1',!$A$3:$AR:100,6,FALSE),"NOT FOUND"), but this formula always returns "NOT FOUND" even though there are matches in Sheet 1
Looks like the ranges in your vlookup are a little wonky, e.g., 'SHEET 1',!$A$3:$AR:100
To be a little more straighforward, let's give you an index/match formula, so you can more easily specify the search array from the output array:
=IfError(Index(Sheets1!$B:$B,Match(Sheets2!B8,Sheets1!$A:$A,0)),"Not Found")
How this works is you Match() the cell on Sheets2! (B8 from your example formula) within the search array, Sheets1!$A:$A (yes, you can use a whole column which makes things a little easier). If nothing is matched, it throws an error (so if-error handles that); if it is found, then it will output (index) based on the output array, Sheets1!$B:$B.
You will want to fix the search array column and output array column to fit your scenario.

Excel - Finding Data in one Column and showing the values in the corresponding column

I'm having a lot of trouble trying to come up with the right formula for this...
I hope it'll be clear!
I have 2 sheets in my Excel.
The first has Active IDs (~500 rows).
The Second has All IDs, active & inactive with a dollar value associated to each member (~1200 rows)
What I want is for Excel to take the ID in the First Sheet with all the Active ID, find it in the 2nd sheet and return the $value.
So that when I look at Sheet 1, I see the Unique ID associated with their respective $value.
Thanks!
This can be done with a lookup function, for example Vlookup.
If your IDs are in column A, you can use
=vlookup(A1,'Sheet 2'!$A:$B,2,false)
In Words: Find the value in A1 on Sheet 2 in column A and return what is in column B (the 2nd column).
Copy down.
You also can use INDEX MATCH combination (more efficient than Vlookup)
= INDEX( Column_with_values , MATCH ( cell_with_Active_ID , Column_with_All_IDs )

Matching data in two columns

I have an excel sheet with a series of last and first names in columns B and C. I'm trying to match names to those in a second sheet in columns A and B. Not every name will match and first or last names might be duplicate but assume never both. I've tried this
=IF((MATCH(B3,Sheet1!$A$1:$A$150,0)*MATCH(C3,Sheet1!B1,0))>1,1,0)
It kind of work but there is nothing stopping excel from matching the last name and then going to a separate line entry to find the first name.
Can somebody please show me how to make excel only search the same row for the last name as it found the first?
I'm not sure if I'm clear about the thing you try to do, but I've two suggestions:
Is this the way you want it to work?
=IF((MATCH(B3,Sheet1!A:A,0))*AND(MATCH(C3,Sheet1!B:B,0))>1,1,0)
What if you make third column in each sheet, using:
=CONCATENATE("CELL WITH A FIRST NAME", " ", "CELL WITH A LAST NAME")
stretched down to the whole data. Then you can do your match between this 2 columns.
With first names in column A, last names in column B on sheet 1, and first name in B3, last name in C3 on current sheet:
=match(B3&C3,index(Sheet1!$A$1:$A$150&Sheet1!$B$1:$B$150,0),0)
Formula in D3 returns the position of the found match:
Don't use with whole column references. It will be slow to recalculate.

Find Column Name in Excel sheet if string matches

I have two sheets sheet1 and sheet2.There is a text in sheet1 'customer'.I want to find the column name like A from sheet2 if text 'customer' found in a cell of row 1 of sheet2.I am using Match function but it is returning only the index.Is there a way to find the column name like A?
Took me a while of playing around but this will work for EXACT matches.
As the example data states Client and not Clients it returns an error and therefore is forced to state "Not Found". In cell B2 of sheet 1, copied down is the formula:
=IFERROR(SUBSTITUTE(ADDRESS(1,MATCH(A2,Sheet2!$A$1:$D$1,0),4),"1",""),"Not Found")

Large excel file, I'm trying to find duplicates and copy the rest of the cells across the duplicate to the duplicate it finds

I have a large excel file, it has 65,000 parts, those part numbers are in column A. Then it has several columns of important info next to the part number (B is retail price, C is my cost, D is the weight, E description and so on until J)
I was just given a list of 16,000 new parts, they are superceeded from old parts, all the new list tells is new part number in column A and old in column B.
So what I can't figure out is how to tell excel if B65001 matches anything in column A1-A65000 then copy the information from the columns next to that A cell into the columns next to this duplicate.
I hope that makes sense?
Please help
I would:
Put the list of new parts in a new sheet (let's call this "Sheet2")
Sort this by column A (required for the VLOOKUP function)
Insert a column next to A in the original sheet
Put the formula =ISERROR(VLOOKUP($A2, Sheet2!$A:$B, 2, FALSE), $A2, VLOOKUP($A2, Sheet2!$A:$B, 2, FALSE)) in column B2 of the original sheet (the new column, and I'm assuming you have headers), and fill it down
Copy this new column and paste it over itself, but select Paste Values from the Ctrl paste options menu. This will get rid of the formula and solidify the new part number as text.
Delete the old A column and the new B column will take its place.
Delete Sheet2 if desired.
The formula in layman's terms: Excel will search for the old part number in Sheet2. If not found, it will produce an error, and just use the old number. If found, it will use the value next to the old part number on Sheet2, the new part number.
An explanation of the VLOOKUP function:
The first argument is the value to search for. In this case the value in the A column of the same row (fill-down will automatically change the "2" accordingly)
The second argument is the range to search in. Excel will look in the first column of this range for the value, and it MUST be sorted.
The third argument is the 1-based index of the column to return. In this case, you want the second column.
The final argument determines whether to return the nearest match (TRUE) or only exact matches (FALSE). You want the latter behavior.
VLOOKUP in this mode will produce an error when a match is not found (specifically #VALUE when the value would come before the first instance of the table, or #N/A if the value is not found in exact-match mode)
Copy the Column in other sheet into you want to search Duplicates,, & write this simple formula but break the database in parts to avoid system delay,,
=IF(COUNTIF($A$2:$A$8, $A2)>1, "Duplicate", "")
Use this array formula to count Duplicates,
=ROWS($A$2:$A$8)-SUM(IF( COUNTIF($A$2:$A$8,$A$2:$A$8)=1,1,0))

Resources