It is really hard to find right solution or answer for this. Thank you in advance!
So in Excel I have 100 places which are named "Place AB A100" Place AC B A101" etc. they all have that unique code "A1xx" at the end.
Then I already have the value for the codes. For example "A100" = A, "A101" = A, "A102" = B, "A103" = C.
Now I just need to match the codes and add the values (told above) next to the name column. It is hard for me because the places need to stay in exact sort and they are mixed...like:
Place XX A110
Place XX X A153
etc.
Looks like this:
Column A Column B Column C Column D
Place A A101 A100 B
Place AA X A123 A101 B
Place AB A119 A102 C
Cannot figure out how XLOOKUP or something else would work here...help pls.
-Drants
I've tried but haven't succeed yet.
XLOOKUP, VLOOKUP, just cant do it manually... there must be formula to figure this out! :D
Related
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,"|")
So I need some help with excel.
What I have is in Black and what I need is in Red.
I have been able to rearrange column B to match column A and have it output in E but I need it to take the values in column C and D with it. This is what I have been using in column E:
=IF(ISNA(VLOOKUP(A1,$B:$B,1,FALSE)), "Missing", A1)
Can someone please help me figure out how to bring columns C and D with column B and populate them in F and G.
Any help is much appreciated! Thanks!!
You were pretty close - Since this is a dynamic range, I would suggest using the OFFSET() function from a specific location in your spreadsheet.
So, here's the formula you could paste into cell E1 and drag across / down to get the result you want:
=IFERROR(OFFSET($A$1,MATCH($A1,$B:$B,0)-1,COLUMN(A1)),"Missing")
Basically, what you're saying is:
If I get an error in matching the value I want, print Missing:
=IFERROR(MATCH($A1,$B:$B,0),"Missing")
Move a set number of rows from cell A1 based on where the numbers match with column A:
OFFSET($A$1,MATCH($A1,$B:$B,0)-1 ...
As I drag to the right, keep referencing the next column:
OFFSET($A$1,..., column(A1))
Hope that helps explain it.
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)
Say I have A, B, C, D, ...X, Y, Z in Column A. And I have numbers in column B as 10,20,30,40,50...for the corresponding A cells. I want to sum values of B where A is a vowel. How do I do it? I tried the 2 options below but that doesn't work
=SUM(FILTER(B1:B26,((A1:A26="a") OR (A1:A26="e")OR (A1:A26="i") OR (A1:A26="o") OR (A1:A26="u"))))
Also
=SUMIF(A1:A26,"a"|"e"|"i"|"o"|"u",B1:B26)
For what they are worth, 'clarifications' from OP's comments
If the column had values like "Sunday", "Monday" .. and then we had to sum values corresponding to Weekdays.
If I had values like abc, deb, bcd, cde then it may fail when I want summation for bcd
Seems to work both in Excel and in New Google Sheets:
=SUMPRODUCT(SUMIF(A1:A26,{"a","e","I","o","u"},B1:B26))
this works for me:
=ARRAYFORMULA(SUM((ISNUMBER(FIND(A1:A26,"aAeEiIoOuU")))*(B1:B26)))
for general case (when column A contains some word), use this one:
=ARRAYFORMULA(SUM((ISNUMBER(FIND("|" & A1:A26 & "|";"|a|A|e|E|i|I|o|O|u|U|")))*(B1:B26)))
change "|a|A|e|E|i|I|o|O|u|U|" to fit your requirements, e.g. "|Sunday|Monday|"
I have an Excel sheet with data only in the first column, where each cell starts with the character H, G, I, B, H, E, S, C, or none of the above.
I would like to write a command so that in the second column, one of four things will happen:
If the cell in the first column starts with H, G, or I, then the cell in the second column is assigned H
If the cell in the first column starts with B or E, then the cell in the second column is assigned E
If the cell in the first column starts with T, S, or C, then the cell in the second column is assigned C
If the cell in the first column starts with none of the above, then the cell in the second column remains blank
I found that this command does part of the problem:
=IF(OR(B25="H"; B25="G"; B25="I");"H";"") & IF(OR(B25="B"; B25="E");"E";"") & IF(OR(B25="T"; B25="S"; B25="C");"C";"")
However, this only works if the first column only contains one character. I would like to tailor this command so that it does not require there to only be one character in the first column, but that it simply starts with the character.
I hope this makes sense. Please let me know if you have any advice!! :O)
Maybe the "LEFT()"-Function is what you are looking for.
Something like "LEFT(A1,1)" should give you the first Character of the String in Cell A1.
More information:
http://office.microsoft.com/en-us/excel-help/left-leftb-functions-HP005209153.aspx
EDIT: Wow, this community is always impressing me. (Too fast for me ;))
Create a small table elsewhere in in the workbook. Let's give it the named range "MyLookup" for the sake of example. This table simply maps the input values to the desired output values, like so:
MyLookup:
Input Output
H H
G H
I H
B E
E E
etc...
Now use this very simple formula to get your result:
=IFERROR(VLOOKUP(LEFT(B25,1),MyLookup,2,FALSE),"")
Make sense?
try this:
=IF(OR(LEFT(AB25,1)="H"; LEFT(AB25,1)="G"; LEFT(AB25,1)="I");"H";"") & IF(OR(LEFT(AB25,1)="B"; LEFT(AB25,1)="E");"E";"") & IF(OR(LEFT(AB25,1)="T"; LEFT(AB25,1)="S"; LEFT(AB25,1)="C");"C";"")