In your Excel workbooks, the data is not always structured according to your needs. Often you may want to split the content of one cell into individual cells or do the opposite - combine data from two or more columns into a single column. Continue reading
Comments page 9. Total comments: 449
Hi Aland,
I have an excel table (C4:O12) that sums values W-L-T (win-loss-tie) records both horizontally and vertically when entering a "W", "L", or "T" in each cell in table with a resulting "0-0-0" format. I have the totals with this format in bottom row from C13:O13 as well as in column from P4:P12 Here are the following formulas Ive used:
horizontal
=CONCATENATE(COUNTIF(C4:O4,"W"),"-",COUNTIF(C4:O4,"L"),"-",COUNTIF(C4:O4,"T"))
vertical
=CONCATENATE(COUNTIF(C4:C12,"W"),"-",COUNTIF(C4:C12,"L"),"-",COUNTIF(C4:C12,"T"))
How do I sum the totals for either column O, or row 13 to get an overall total in the same "0-0-0" format?
THANKS !
Hi, David,
would it be possible for you to send us a sample workbook with your data and formulas you're using to support@ablebits.com? Don't forget to include the link to this comment.
We'll look into the way your data is stored and try our best to help.
Hello all,
Is there a way concatenated results can be searchable (ctrl+find) and/or filterable?
Thank you in advance for any tips :)
Although this question was a bit more than a year ago, I too was attempting to figure this out and landed here. Excel can natively do a find of this information. With the native find window open select "Options<<" from there make sure you select Look in: "Values". The default is "Formulas" however this will not produce the results you are looking for. Hope this helps someone.
thank you Aland for above info.
Hello, Aland,
sure they can :)
As for searching, you can use our Advanced Find and Replace add-in. You can download its fully functional trial version here and see if it works as you need.
As for the filter, you should be able to use Excel built-in one, but if for some reason it doesn't work, you can try one from our collection of Quick Tools.
Hope they help!
How would you combine values from multiple cells separated by commas only when values exist?
Example
A B C
1|George Herman Ruth
2|Jackie Robinson
3|Mark Marche McGwire
Row 1= Concatenate(A1,",",B1,",",C1) = George, Herman, Ruth
Row 2 = Jackie,,Robinson
I don't want a comma when no values exist to separate.
Hi, was this question ever resolved, I have the same issue
1 Major;Double Major
2 Major
3 Major;Double Major
The double comma is there because the middle cell is blank. Try this:
=IF(B2="",CONCATENATE(A2,", ",C2),CONCATENATE(A2,", ",B2,", ",C2))
Hi All, This is my actual formula =IF(F$1,'Apr-2016'!J16,"") "Apr-2016" is the name of the sheet in the workbook, i would like to use concatenate so I can choose the year (2016) from another cell. please help many thanks
how to use concatenate for (bluedart 5565565 24-Jul-17) in one column.. data in brackets are in 3 different column.
SREI $ 41,26,000 54 days
how to use concatenate for figure including comma = Devid-$41,26,000-54days
sry, i missing something
actually the SOURCE DATA IS
oldno54,newno4355,eaststreet,virudhunagar,mutharpatti,sattur,greengarden,chennai,tn,tamilnadu,600018
and the excel format is,
ADDRESS1 ADDRESS2 ADDRESS3
oldno54,newno4355 eaststreet,virudhunagar mutharppati,sattur
ADDRESS4 CITY STATE PINCODE
greengarden,chennai tn tamilnadu 600018
so please help me,solve this problem immediately.
hi, i am sonai.i have one question please answer it.
the format of the EXCELL is,
ADDRESS1 ADDRESS2 ADDRESS3 ADDRESS4 CITY STATE PINCODE
so, split the address to this format,
the source data is
oldno54,newno4355,eaststreet,virudhunagar,mutharpatti,greengarden,chennai,tn,tamilnadu,600018
please, solve the problem.it's my humble request youto.immediately
This is great, I understand the concatenate and the and operators better now. Thanks a lot. WOW!
I have inserted a row and typed in the formula
=CONCATENATE(J1," ",K1)
and have combined the first and last names of my clients. How do I now place the combined data into another cell without showing the above formula in the Excel formula bar?
Keith
I copied my combined names and then did a Paste Special into a new column. I tried a few choices until the right one popped up.
pls I need Ur assistance to concatenate course still outstanding (CDO) of students prepared in Excel sheet e.g =if( A2:D2=0, concatenate A1,B1,C1,D1,",") can't it work if not I need Ur assistance.
Hello,
How to a concatenate this:
A1 = "has a account balance of" and B1 = $ 2,250.38
When I used concatenate the result always "has a account balance of 2250.38,
the Result that I want is " has a account balance of $ 2,250.38"
Thank you in Advance
The problem is caused by the fact that your number is not entered into the cell with a $ symbol, etc. but the cell itself is formatted as currency (the actual cell content is just 2250.38 which is why the $ does not show when concatenating). The following will work:
=CONCATENATE(A1,DOLLAR(B1,2))
how to remove duplicate entries ( which is comma separated) found in single columns ?
example :- 8,4,7,8,6,3,3,9,6
expected output :- 3,4,6,7,8,9
I found your answer but in excel sheet if you require just mail
my presentation is T D S but helpful.
Hi there
How can the last cell in a column filled from the first cell will automatically minus
for example IN column A when in a2 was a number a2 - a1 and if in A3 was number A3 - A1 only the last fill cell minus first cell and write Answer in A10
Greetings of the Day Svetlana!
I just feel lucky that I found this forum.
Thanks a ton for the solution.
It works like a charm...
Best Regards,
Abhinav
Hi Svetlana,
The () didn't work so I've uploaded a screenshot and here the link.
https://ibb.co/jqf3Ha
I hope it helps!
Thanks in advance.
Regards,
Abhinav
Hi Abhinav,
All comments containing external links are subject to manual validation, that's why they did not get posted immediately (the only one working anti-spam technique we could think of :)
As for the formula, the "iframe..." string is the same for all rows except for the ID from column 1, right? If so, you can split it into 2 parts, and put the parts into 2 separate cells. For example:
Cell F1: <iframe width="560"… embed/
Cell F2: " frameborder="0"… </iframe>
And then, you can use the RIGHT() function to extract the ID (from A2 in this example), and concatenate the 3 parts like this:
=F1&RIGHT(A2,LEN(A2)-FIND("/",A2, FIND("/", A2, FIND("/",A2)+1) +2))&F2
Hi Svetlana,
Thanks for replying.
I did enter the desired result but it appears that it was not posted?
I'll try again, don't know why it was removed.I'll put the contents of the Column 2 in the () if it helps in posting.
Column 1: https://youtu.be/ZWiPQINKvW8
Column 2: ()
So, Column 2 is the desired result and ZWiPQINKvW8 is the ID from Column 1.
Hope it gets posted this time.
Thanks!
Abhinav
Hi
Thank you for the detailed examples.
I've a bit complicated query though, may be because I'm new to this.
So, I need to fill Youtube URLs in one column and the Embed codes in another.
Is it possible that I can just fill in the URL and the embed code generates by any formula?
For E.g.
Column 1: https://youtu.be/ZWiPQINKvW8
Column 2:
Column 2 has the Embed code which has the Video ID after "embed/" that appears at the end after the "/" in Column 1.
It is same for all the videos and I've to maintain a sheet of Thousands of them!
So far I've been copying and pasting both from the YouTube videos but would love to know if it's possible to merge the partial text(ID) from column 1 in the middle of the text in Column 2.
Thanks in advance!
Regards,
Abhinav
Hi Abhinav,
For me to understand the task better, can you please give an example of the partial text(ID) in column 2 and the merged string (desired result)?
I have 4 columns of data (A - D) and each project has 13 rows.
Column data: Name, start, finish, duration
Project 1
13 rows of data
Project 2
13 rows of data
How do I get Concatenate or another method to read the 13 rows of data across and then down??:
A3, B3, C3, D3,
A4, B4, C4, D4,
A5, B5, C5, D5
I need all 13 rows to read to a single row left to right.
Can you help??
We feel you bruh... You can search the World Wide Web for the solution, but don't go for a page :")
How do i concatenate if I only want single quotes('') on the first set of numbers but nothing on the last 2. example. This is how I want the results to look.
Results:
insert into #driver select'98765432',20170517,5
Thanks for your help!
Hello, Mark,
the ASCII code for single quotes ('') is CHAR(39). Assuming that the numbers are in A1:C1, to get the desirable result, try the following formula:
=CONCATENATE(CHAR(39), A1 & CHAR(39),",",B1,",",C1)
Just add the references to the cells with the text to this formula and you're good to go :)
Awww so cute of you for the help :")
What? Are you two years old Kal? What a jerk.
jesus christ, she only answered your question, no need to be condescending...
When i concatenate =1&2&3&4&5 it gives 12345
In my program i want to remove any one of the items, say 4
and it should show 1235.
Can any one guide me how to do it?
Thank you
concatenate =1&2&3&4&5 it gives 12345
then integer =int (12345) above value-11110
your answer will be there.
Just minus 11110
Hello,
If there a way to Concatenate and use Right at the same time?
Ex: 123456 to ***456
Doing so with on one column, ID number is 123456 then ID number 2 would be ***456
Thank You
Hello, Jess,
if your ID is in A1, then enter the following in B1 to get ***456:
=CONCATENATE("***",RIGHT(A1,3))
hi am trying use double code text file to be upload.
pls refer.below sample format.
"IH","INV-3456","2007-11-20","1","1","TESTING","2","1","AED","1000","CIF","","","",""
"ID","1234","03056980","NormalHSCode","N","kg","1","kg","1000","m","","1000","US","123456789012345","1","12352","","","11"
please help
Can u Please help me??
How can we find Price(numbers) from letters?
eg.A B C D
a 1 ab 12
b 2
c 3 bc 23
.....................
In column D i want the values of merged letters...
please help me
Can u Please help me??
How can we find Price(numbers) from letters?
eg.A B C D
a 1 ab 12
b 2
c 3 bc 23
In column D i want the values of merged letters
Sub Code()
' Range("C17").Select
' Selection.Copy
' Sheets("Sheet2").Select
' Range("B10").Select
' ActiveSheet.Paste
For x = 2 To 24
con = ""
Sheets("BB").Select
state1 = Cells(x, 9).Value
district1 = Cells(x, 10).Value
village1 = Cells(x, 12).Value
Sheets("AA").Select
For y = 2 To 60
state2 = Cells(y, 10).Value
district2 = Cells(y, 11).Value
village2 = Cells(y, 13).Value
If state2 = state1 And district2 = district1 And village2 = village1 Then
con = Cells(y, 15).Value = Cells(y, 15).Value + ("y14", " , ","x15")
'Sheets("BB").Select
Cells(x, 16).Value = Cells(x, 16).Value + ", "
End If
Next
Next
End Sub
y there is an error in concentation
thank u
how to add a space between word and number (Ex:ACT222) In a single cell.
Thank You.
If the text and numbers are always in blocks of 3 and 3 (e.g. ACT222, BOB876 etc.) then (assuming data is in cell A1):
=CONCATENATE((MID(A1,1,3))," ",MID(A1,4,3))
Hi Svetlana,
Great website. Is there vba formula that could help sort my text strings like this:
House1
House2
House3
Truck1
Truck2
Truck3
Result
House1|House2|House3
Truck1|Truck2|Truck3
Thank you.
Hello, Preston,
we don't build VBA formulas, but we can provide another option which you may find useful.
If your data starts in A1, enter the next formula in B1:
=INDIRECT(ADDRESS(ROW()*3-2,1))&" | "&INDIRECT(ADDRESS(ROW()*3-1,1))&" | "&INDIRECT(ADDRESS(ROW()*3,1))
This will return House1|House2|House3
and copy the formula to the row(s) below (read how do to it here) to apply for other group(s) of the data.
Hope it helps!
Hi,
After concatenation I want any part (any one of the cells to be concatenated) of the result as BOLD ITALIC. How to do it with VB and without VB?
Thanks.
How to connect text string for varing range given below
Input:
ST1 Cataract
ST2 Macular degeneration
AMD
ARMD
ST3 Diabetic retinopathy
nonproliferative retinopathy
diabetic eye disease
leaking blood vessels
ST4 vitreous hemorrhage
extravasation of blood
leakage of blood
ST5 Macular hole
macular break
Output:
ST1 Cataract
ST2 Macular degeneration OR AMD OR ARMD
ST3 Diabetic retinopathy OR nonproliferative retinopathy OR diabetic eye disease OR leaking blood vessels
.....
Since range is not fixed for each output how to use CONCATENATE or any other function
How can I concatenate two dates?
Column A: 3/1/17
Column B: 3/5/17
What I want for Column C: 3/1/17 - 3/5/17
Is there a formula for this? I seem to only be able to find formulae for text and not dates.
Nevermind I found it :)
=CONCATENATE(TEXT(A1,"dd/mm/yyyy")," - ",TEXT(B1,"dd/mm/yyyy"))
I have two columns with dates. Most times each column has data but some do not. I want to concatenate the two date columns into a single column. Here is what I am using: =TEXT(D2, "m/d")&" - "&TEXT(E2, "m/d"). This is working perfectly except when one of the columns is blank I get this result: 10/31 - 1/0. I want the formula to return just the single date when one column cell is blank. Help?
=IF(E2="",TEXT(D2, "m/d"),TEXT(D2, "m/d")&" - "&TEXT(E2, "m/d"))
Hi,
I have 3 columns, each column have a text. But there are cells which does not have any text and when I concatenate it leave two spaces. Please help how this can be sorted.
Thanks.
For example.
how are you how are you
how you how you
I want to perform set theory operation like A union B and A intersection B operation on two cells containing comma separated numerical values in two cells without repeating the values.
Kindly help me
Hi,
I have data in 2 column, same values repeated in both column need unique concatenate value for combination ex-
ColumnA ColumnB
A B =CONCATENATE(A2,"_",B2)
B A
C D
D C
Required unique concatenate A_B(for B_A also)
Result should
A_B
A_B
C_D
C_D
Pease help for given concatenate and vlookup formula
Thanks
=IF(B2>A2,CONCATENATE(A2,"_",B2),CONCATENATE(B2,"_",A2))
Hi,
the value are 4.89 &
this value in separate (not decimal place) Ans : = 4.00
how to use formula in this value..
thanx..
Hi,
A B
1 BMW 2010
2 2001 4.6L
3 2002 1999
4 2003 Honda
5 Chevy 1978
6 3.5L 602384
7 128435 2008
I want to keep just the data that looks like an YEAR from the 2 columns(A,B).
I tried to write a function that looks at A1 and see if it's a number with the character limit lower than 5, and if YES, to bring over the cell, if NOT to leave a blank space.
=if(ISNUMBER(LEN(A1)<5), A1, " ")
I tried something more complicated like this.
=if(ISNUMBER(LEN(A1)<5), A1, if(ISNUMBER(LEN(B1)<5), B1," "))
I wanted to look at A1 to see if it's a number with length<5, and if yes to bring over the cell, if NOT to look at B1 if it's number with length<5 and bring it over, and if NOT to leave a blank space.
Still didn't work.
I've tried this way as well using the & in the argument.
=if(ISNUMBER(A1)&LEN(A1)<5, A1, " ") or
=if(ISNUMBER(A1)&LEN(A1)<5, A1, if(ISNUMBER(B1)&LEN(B1)<5, B1, " "))
Still NO luck.
What am I doing wrong? :(((
Thank you in advance for any tip :D
name S/O, D/O
saira ali khan
mehboob ali ghulam ali
how i use formula concatenate here ? please help
Hi All,
It would be great help if you can suggest me best formula for below report.
[My Data is like....]
Name Visited Planned Date
------ ------- ------------
Red Yes 07/10/2016
Blue Yes 09/10/2016
Red Yes 10/10/2016
Green Yes 11/10/2016
Green No 12/10/2016
Red No 13/10/2016
Blue Yes 14/10/2016
[I need report like below....]
Name Visit Dates
------ ------------
Red 07/10/2016; 10/10/2016
Blue 09/10/2016; 14/10/2016
Green 11/10/2016
Please suggest best formula to create report. Data will be added regularly in my data tracker. And report will be updated automatically.
Please help. Thanks in advance.
Hi All,
I have formula =(C21-D21)/C21.
I want to change C and D in the formula based on some other cell value like.
Ex: cell H20 and I20 , if i enter A in H20 and B in I20 then formula should become =(A21-B21)/A21. 21 is dynamic(Range is 21 to 678 in table)
Thanks in Advance
Dears hi,
i have date in format dd,mmm,yyyy
date is
16-01-2017
17-01-2017
But want as in text format like
'16-01-2017
'17-01-2017
any one can help with this
thank you
hello all;
i want to concatenate cells from sheet 1 according to certain criteria
and i successfully did. But the problem i face now, if i insert new line between existing lines in the sheet 1 the function will skip the new line.
any idea how to make it on all lines?
Thank you
Regards
CORRECTION
Hello All,
I spent great deal of time trying to solve my case by searching on the web
for the correct Excel formula, but unfortunately I'm still looking for it.
I saw a lot of samples, videos, tutorial…still not yet found what I’m
looking for. I’m must confess, I’m new in this and it’s quite hard to
find the correct formula for the following problem (pretty tricky):
I have an article with Id# 300045 and this article has 5 pictures – 300045,
300045k, 300045ak, 300045bk.
I want to retrieve all 5 pictures to this specific Id 300045 as follows:
COL A COL B COL C COL D COL E
300045 300045 300045k 300045ak 300045bk
300045k 990099 990099k 990099bk
300045ak 915501 915501k
300045bk 915502
300045ck 930045 930045ak 930045kk
990099
990099k
990099bk
915501
915501k
915502
930045
930045k
930045ak
930045kk
Any ideas?
Thank you for your help.
Best regards,
Miguel
Hey,
I am using the concatenate command to put a group of things together. One of the numbers is a sum of a bunch of numbers from another page and when not formatted it has a number of digits after the decimal point (17.9476930697) In the original cell I have it formatted to only show 2 digits after the decimal point but when I run the command the formatting resets and shows every number after the digit point.
I have multiple cells and multiple lines so just "hard inputting" the number isn't much of an option and its a document that could undergo revisions.
Is there anyway to format numbers within a concatenate command?
Cheers,
The ROUND function can be used to change the number of decimal places being shown when you are concatenating - e.g. text in cell A1, number with 9 decimal places in B1. The following will reduce to the number part to 2 decimal places:
=CONCATENATE(A1,ROUND(B1,2))
hello all,
I have a situation need your advise on how to get my intended result in excel.
In sheet1--> column C --> row 10, I have a sentence / description referring to a sum of quantity (say 250MT) which is a sum of various units in sheet2 (say sum of 10 containers detailed with various other information).
the question is how to merge the cell of sum in sheet2 In sheet1--> column C --> row 10.
Appreciate your advise by email.
thank you
This is a really useful article. It allowed me to build my own simple binary converter in Excel. Thanks!
Hi Everyone,
I Do Make sale sheets for my company in excel, In A1 I put a company Name and and B1 i put the representative from our marketing team, like wise i already made a sheet with thousand companies and representative,i want that when i write a compan name while making sales sheet so the representative name auto fill in cell by the date above which i made,
can any one help me out for this.
How to concatenate ROW and COLUMN values?
I am trying to join text with number cell with CONCATENATE. Now number cell is formatted as if minus its in Red and if plus its written in blue. is it possible to reflect the same formatting with CONCATENATE?
Column A
330
340
320
232
343
Column B
05
05,08,09
03,04,08
01,02,05,06,07,03,04,08,09
06,01 0.45 23207
Price
0.50
0.25
0.98
0.58
0.45
Find_Price (After concatenation of column A & B)
33005
34008
32004
34009
23207