Hi guys I'm new to excel and i would like to concatenate the country names into a single cell separated by '/'for the particular corresponding customer as shown in the below
colA1 colB1
A India
A UK
A USA
A Japan
A India/UK/USA/Japan
B India
B UK
B USA
B Japan
B India/UK/USA/Japan
i am expecting the results in the above highlighted row using excel.
Thanks for your help
The easiest way to concatenate cells is by using &. Just use it between cell names and it should work.
In order to add other characters in between the text on the concatenated cells (including spaces), use "".
So, in order to fulfill your request, you should use something like the below (assuming the cells you want to concatenate are in column A:
=A1&"/"&A2&"/"&A3&"/"&A4
Considering you would like to add "A" to the first word (India) but not to the others, you can try the below formula:
=(A1&"/"&RIGHT(A2,LEN(A2)-2)&"/"&RIGHT(A3,LEN(A3)-2))&"/"&RIGHT(A4,LEN(A4)-2)
It will consider A1 in full, A2 in full minus the first 2 characters and so forth. You can use the same formula for part B if you replace the cells within it. Hope that's what you're looking for.
Related
I'm trying to compare membership rosters which contain 2 columns each for first name and last name. If the names match I want to add conditional formatting and a value in a 5th column. (I'm trying to determine who is a member and who is an external contact.)
I've tried to adapt some formulas found here but no luck.
For example:
If Jon and Doe exists in A & B and C & D on any row as long as Jon and Doe are together in both columns, than I would like to add conditional formatting to Jon and Doe in column A & B and add the word "Member" in a separate column. If Jon Doe only exists in columns A and B, then add the word "External" instead of Member. My example image can explain better.
I got this close but am not able to adapt it to use labels much less conditional formatting. I'm happy to ditch conditional formatting if it's too complex.
=INDEX($N:$N,MATCH(1,(A2=$L:$L)*(B2=$M:$M),1))
Conditional Format Formula, applied to A2:B4 in the sample data
=IFERROR(MATCH(1,($A2=$C:$C)*($B2=$D:$D),0)>0,FALSE)
Status Formula
=IFERROR(IF(MATCH(1,($A2=$C:$C)*($B2=$D:$D),0)>0,"Member",""),"External")
Note the $'s anchoring A and B columns
I want to compare data in two excel cells (from two columns) and write the matching values only to third column.
I have two lists of countries, column B has roughly 120 countries while column A has roughly 192 countries. I can't figure out a way to display the countries that correspond with each other (seeing if B belongs in A).
Here is an example of what I pulled off from another thread and it doesn't work for me.
excel question
Now, here is my spreadsheet.
My spreadsheet
I just want to validate and compress the countries that are listed in column B to see if they match Column A and print them in C.
Please let me know how I would do so?
Thanks,
You can use this formula in cell C1 and drag down as far as necessary.
= IF(SUMPRODUCT((B1=A$1:A$192)+0)>0,B1,"")
This formula returns the country name in the cell next to it if the country exists in the A column, and blank otherwise.
I googled like crazy before I came here.
I have 2 columns of information (I have to use alternate data for privacy). See below.
I would like in a 3rd column to look thru the list (or the range) of the first column and return the matching word. For example, I need the 3rd column for the first sentence (There is a cup on the counter) to say "CUP".
I've tried all sorts of combinations of functions and I can't quite get it right.
1st column 2nd column 3rd column
Desk There is a cup on the counter **Result should be: Cup**
Chair You need to plug the cord in
Cup The desk is red
Cord I have a large computer
Computer I put the chair over there
Assuming row 1 is a header row, put this formula in cell C2 and copy down:
=IFERROR(INDEX($A$2:$A$6,MATCH(1,INDEX(COUNTIF(B2,"*"&$A$2:$A$6&"*"),),0)),"")
Currently, I am working with a scenario where I have 0 to 6 names in the field. For example, A2 has Bob Smith and Jone Random. Below is an example how they look in a check.
Effi Liu
<- (enter/gap)
Kevin Xing
Basically, I want to generate a 1 column that counts how many people in A2. For example, two people and then create a function that will separate. Each of the names into different columns.
If you have the names separated by the Enter Key in Column A, use the below formula in Column B and drag it to the right upto 6 or more cells and then drag down,
=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,CHAR(10),"#"),"#",REPT(" ",999)),(COLUMN(A:A)-1)*999+1,999))
This formula splits your name strings with the Enter Key as the delimiter into multiple columns as you drag. You could then use COUNTA function to find the non-blank cells (number of names). I leave that part to you to google and find it. Hope this helped you.
I need advice on how I should recode text to numbers or vice versa or a combination of text and numbers. In the example, I need to recode Singapore to 1, Malaysia to 2, Japan to 3 and Vietnam to 4 and so on. Column A contains all the countries, and column B should contain the recode data. I tried using the replace and substitute commands and while it is able to do the job, it only replaces one text within a single cell. Because of this, I am not able to copy the formula down the column. Is there a single formula that I can include all the variables I want to recode, then apply the formula to all affected data column-wise?
Example
A lookup table would be conventional but:
=MATCH(A2,{"Singapore","Malaysia","Japan","Vietnam"},0)
in B2 and copied down might serve (extended with more countries to suit).