I need a little help: I have to cross match Database A user names(firstname lastname) with Database B where there are some extra characters and the order is last name firstname), so the normal vlookup does not find exact match. I tried the following: I used text to column from the Database A, to have two separate column, then I tried to find the name from Database B
=IF(IF(ISNUMBER(SEARCH(A1,C1)),ISNUMBER(SEARCH(B1,C1))),"yes","no")
This show correct result when the name is in the same line
A1 Tom
B1 John
C1 John dr tom -
The results is true(yes), but in case:
A1 Tom B1 Jon C2 John dr tom - the result are false(No)
I need to same at Database A which is a appearing at Database 2. So I need to find the duplicated items.
Can you help me out how to correctly find what I am looking for?
=VLOOKUP(""&B1&"" &""&A1&"",F:F, 1,FALSE) This was the answer, I managed to figure out.
Related
So I have a formula that shows if a cell contains text from a list:
=SUMPRODUCT(--ISNUMBER(SEARCH("List of companies in Worksheet A",A1)))>0
It works correct, but I need to further expand this formula.
I have a two data worksheet:
W1 is a list of companies and that show preferred companies for given product in given country,
W2 is a list of documents that show which company has been use in which country for which product.
I need formula that shows if for given document the company is preferred for given country and product.
Above formula solved the issue of company as it checks if company mentioned in W2 appears in W1, now I would need to add two more conditions, to check the country and product.
Current formula is this:
=IF(AND(SUMPRODUCT(--ISNUMBER(SEARCH("List of companies in Worksheet A",A1)))>0,"Preferred", "Non Preferred")
How do I reverse the formula so it will show me in WHICH cell the found value in W1 is so I can use simple VLOOKUP and = formula and and the conditions, like:
=IF(AND(SUMPRODUCT(--ISNUMBER(SEARCH("List of companies in Worksheet A",A1)))>0,B1=Vlookup(SUMPRODUCT(--ISNUMBER(SEARCH("List of companies in Worksheet A",A1))>0,Table in W1,1,"Preferred", "Non Preferred")
I am really stuck, please help.
An example of worksheet A
Company Name
Company Code
Country
abd
12355
Germany
aaa
23322
Austria
asc
432
France
asc
123
USA
asce
1234
Poland
An Example of worksheet B
Company Name
Country
abd - 111
Germany
aaa - 234
Austria
asc - 432
France
asc - 123
UK
asce - 1234
Romania
If I use:
=SUMPRODUCT(--ISNUMBER(SEARCH("List of companies in Worksheet A",A1)))>0
It will highlight 3 bottom rows, however I need to apply second condition so it will highlight ONLY 3rd row, the one with France.
Highlighting is pretty hard because CF rules don't allow to use references to other worksheets besides current one neither array formulas. But you may use a helper column to get the output you need and then hightlight based on that output:
Worksheet A
Worksheet B
Notice France is the only highlighted value because is the only country that fits pattern Company Name - Company&CodeCountry
Formula in column C (array formula, so you must introduce it pressing CTRL+ENTER+SHIFT:
={ISNUMBER(MATCH(A2&B2;'Worksheet A'!$A$2:$A$6&" - "&'Worksheet A'!$B$2:$B$6&'Worksheet A'!$C$2:$C$6;0))}
CR rule to highlight applied to column B is based on this formula:
=C2=TRUE()
UPDATE: If you really really need to skip the helper column, you may benefit from function INDIRECT:
INDIRECT
function
But if your dataset is big, I don't recommend this solution because it may really overcharge your file because INDIRECT is a volatile function:
INDIRECT – Excel’s Most Evil
Function
Besides, if your dataset is fixed (I mean it goes always in the same Address like A2:C6 or A2:A1000, whatever but always the same) you may use it, but it it changes all the time, it will slow down your file.
Anyways, you can make a CF rule based on this formula:
=ISNUMBER(MATCH(A2&B2;INDIRECT("'Worksheet A'!$A$2:$A$6")&" - "&INDIRECT("'Worksheet A'!$B$2:$B$6")&INDIRECT("'Worksheet A'!$C$2:$C$6");0))
Can someone help on this? I have column A with telephone number and Column B with country code. I want to remove the country code in column A if it is there to avoid duplication. Can someone help me?
Column A 1234567 Column B 1 Column C 1234567
Column C should have the formula to check if 1 is already in the beginning of the cell value A, if yes, it'll remove it, but if not, column B value will be added to it. Another scenario is below: Column A 234567 Column B 1 Column C 1234567
Also, I would like to add separators in this formula after the country code, and after three digits of the country code based on column 1 with removed country code in it.
How to append it in this formula?
=IF(B1 = --LEFT(A1, LEN(B1)),A1,--(B1&A1))
Appreciate your answer!
As far as I understand what you describe, you may be after something like this:
="+"&TEXT(B1,"0")&"-"&
IF(LEFT(TEXT(A1,"0"),LEN(TEXT(B1,"0")))=TEXT(B1,"0"),
MID(TEXT(A1,"0"),LEN(TEXT(B1,"0"))+1,99),
A1)
The statement about "after three digits of the country code based on column 1 " is unclear. This formula gives you tools to add characters before and after the country code, while it removes country code duplication.
edit after comments You don't really describe it, at least not clearly, but it looks like you want a vertical bar after the country code and again after the first three digits of the phone number. The formula to achieve that is
=TEXT(B1,"0")&"|"&
REPLACE(IF(LEFT(TEXT(A1,"0"),LEN(TEXT(B1,"0")))=TEXT(B1,"0"),
MID(TEXT(A1,"0"),LEN(TEXT(B1,"0"))+1,99),
A1),4,1,"|")
another edit after stitching together what else you might want but don't clearly describe: If column B can possibly contain either numbers like 1 or 63 but also text that starts with a country code, followed by a space and some other stuff, like 63 2, then you can use this formula
=LEFT(TEXT(B2,"0"),FIND(" ",TEXT(B2,"0")&" ")-1)&"|"&
REPLACE(IF(LEFT(TEXT(A2,"0"),LEN(TEXT(B2,"0")))=TEXT(B2,"0"),
MID(TEXT(A2,"0"),LEN(TEXT(B2,"0"))+1,99),
A2),4,1,"|")
hope you can help me :-)
My table looks like this:
A B C D
23940823 Larissa Horst =VLOOKUP(C1;A1:B2000;1;FALSE)
23940824 Horst Leon =VLOOKUP(C2;A1:B2000;1;FALSE)
23940825 Fred Kim =VLOOKUP(C3;A1:B2000;1;FALSE)
23940826 Horst Peter =VLOOKUP(C4;A1:B2000;1;FALSE)
I would like to get the number from the specific A, if the Value of C is in B. So for "Horst" it should be "23940824"in this case, but it only displays "#NV".. Do you know why?
It's because SVERWEIS search the first column and goes to right. You need here INDEX instead:
=INDEX(A:A;C1) 'where C1 is your search string
See also MS-docu: https://support.office.com/de-de/article/INDEX-Funktion-a5dcf0dd-996d-40a4-a822-b56b061328bd
Update
First check if the value of cell C is in column B. If so it displays the value of cell A he is finding:
=IF(ISERROR(MATCH(C1;B:B;0));"Not in Column B";INDEX(A:A;MATCH(C1;C:C;0))) 'for D1
Remember that the key words could be different if you use no english excel version (like english = IF, german = WENN)
I am using the following formula as part of a multi result look up function. I have several of these formulas posted into one row each beneath the other, so if I type catering into cell K22 on sheet 1 my formula then looks up that matching word from column b on sheet 2 and produces the name in column a. The formula also includes duplicating this lookup a few times to fetch other values from other columns with the same matching result.
so for instance my columns on sheet 2 look like:
Name Description Location Number
Amy hotel london 1
Dave hotels manchester 2
Mike catering Birmingham 3
What I want to do is to use wild cards around my cell K22 in this formula to show if the descripion word I type in is like hotel; i.e. hotels, hote ... etc then find the result?
...
I know this can be done using index match but can I use them with the following code I have? at the moment this is an array formula but I get no result when I try to do it like this. can someone show me where I am going wrong, tanks
=IF(ISERROR(INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),1)),"",INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),1)) & " - " &IF(ISERROR(INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),3)),"",INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),3)) & " - " &IF(ISERROR(INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),4)),"",INDEX(Sheet2!$A$1:$D$7,SMALL(IF(Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*",ROW($B$1:$B$7)),ROW(1:1)),4
Although you can use wildcards in the lookup value within a MATCH function (and in other contexts), you can't use them here. When using wildcards with a direct comparison with = like you have, i.e.
Sheet2!$B$1:$B$7="*"&Sheet1!$K$22&"*"
the * is interpreted as a literal asterisk not a wildcard
Replace all instance of the above with this
ISNUMBER(SEARCH(Sheet1!$K$22,Sheet2!$B$1:$B$7))
I am wondering if there is a way to replace a cell value from another list without having to write a VB script.
Here is the problem I am trying to resolve:
I have last names in a column:
Smith
Jones
Taylor
etc.
I have another column with IDs e.g.
Smith_ID
Taylor_B
Jones_C
I would like to replace Smith with Smith_ID, Jones with Jones_C etc. Obviously my list is much longer than 3 entries.
He can do it.
Extract column IDs with "_" character by "Text to Columns"
A column
Smith
Jones
Taylor
B column
Smith
Taylor
Jones
C column
ID
B
C
Now write to following formula
=CONCATENATE(A1;"_";VLOOKUP(A1;$B$1:$C$3;2;FALSE))
I hope you do
If you have a common value between the 2 lists, then you can use Vlookup() (see link for better examples) to match the 2.
Using your example, you have Sheet1 that says:
Smith
Jones
Taylor
In Sheet2, you have:
Smith 4
Jones 9
Taylor 6
Then do this:
In Sheet1, add a column with the formula =vlookup(A1,Sheet2!$A$3:$B$3,2,False). This will return 4 for the 1st row, 9 for the 2nd, etc.
(Optional) If you want to get rid of the original values completely, you can then copy&paste values and delete the original column OR just hide the original column.
Is this what you're looking for?
To answer this question under general situation, suppose you have two columns as followed:
A Smith,Jones,Taylor,Kevin,Yell,Ashton...
B John Harvard, Yell USC, Kevin Cruise, Ashton Bond, Smith Stone, Taylor Shift...
The classic case here is that you have two pretty much alike columns only with slightly difference. It could be a typo or some other mistakes.
What you want to do is to replace cells'value in column A by them in column B, if we assume that column B is the right thing you want.
So for each cell in A, you want to know the position of its approximate match in column B. For example, given A1(Smith), you want to know where Smith Stone is, in this case, B5.
Begin with a new column C, combined with match function and wildcard, filled C1 by the following formula:
row_index=match(A1&"",$B$1:$B$6,0)
you now extract row_index of every approximate match corresponding to column A. Then by using
=index($B$1:$B$6,row_index,0)
which returns you "Smith Stone" in cell C1. Same for other cells.
*Remark: The biggest flaw for this method is that it kind of requires the approximate match in B for each cell in A should be unique.
I had 2 columns, one was an Vendor Name, the 2nd was the Vendor Address but it also contained the Vendor Name. I needed to strip out the Vendor Name which would leave me with the Vendor Address without the Name.
For example if one column had "Con Ed", the next column had "Con Ed 123 Street, New York, NY 11111", I needed to replace "Con Ed" with null and just have "123 Street, New York, NY 11111" in a column.
Here's what I did and I will also let you know what you can do to accomplish your goal.
First I created a new column and set that to the Length (using the LEN() function) of the Vendor Name.
Then I created another new column and set that to the length of the Vendor Address.
A third column and was set to use the Right() function. Where the text is the Vendor Address and the length is the Length of the Address minus the length of the Vendor Name.
So consider: "Con Ed 123 Street, New York, NY 11111"
1st column: (Length of Vendor): len(Con Ed) = 6
2nd column: (Length of Vendor address): len(Con Ed 123 Street, New York, NY 11111) = 37
3rd Column: Right([Vendor Address], 31 (37-6)) = ", New York, NY 11111"
Lastly I just applied the TRIM function to the 3rd column.
In your case you would just want to use the Concatenate function to append the the original column & the new column.
So in summary you'll have the below columns:
Column 1: Names:
(Smith,Jones,Taylor)
Column2: IDs:
(Smith_ID,Taylor_B,Jones_C)
Column3: Len([Names])
Column4: Len([IDs])
Column5: The "replace" function
= TRIM(Right([IDs], ([Column4] -[Column3] ))
Column6: String put back together
=Concatenate([Column3],[Column5])
=INDEX('All_Linguists_All_ProjectsFri J'!$DA$2:'All_Linguists_All_ProjectsFri J'!$D$71355,MATCH(A2,'All_Linguists_All_ProjectsFri J'!C:C,FALSE),1)
Dont have time to explain it, but if you know how to write formulas in excel, this should be useful. Sorry for not explaining.
Hope you are using excel and in that you want to replace value of one cell of raw from another cell of same raw and this has to be done for entire column and not form selected raw.
In this case you can copy the values which you want to kept (i.e. ID column) and then pest the same in column Last name.
If values are in same raw then there is no problem and from your query it appears that values are in same raw.
I use this formula when searching cell B1 for the letter "s", if found then I concatenate the word "addition" to the value of cell A1 otherwise just take the value of cell A1.
=IF(ISNUMBER(SEARCH("s",B1))=TRUE,CONCAT(A1, " addition"),A1)