Skip to main content

Conas liosta na gcolún a thiontú go liosta scartha le camóga in Excel?

Más mian leat liosta sonraí colún a thiontú go liosta atá scartha le camóg nó deighilteoirí eile, agus an toradh a aschur i gcill mar a thaispeántar thíos, is féidir leat é a dhéanamh trí fheidhm CONCATENATE nó VBA a reáchtáil in Excel.


Tiontaigh liosta na gcolún go liosta scartha le camóg le feidhm TEXTJOIN

Ceanglaíonn feidhm Excel TEXTJOIN le luachanna iolracha as a chéile, as colún nó as raon cealla le teimpléad sonrach.

Tabhair faoi deara nach bhfuil an fheidhm ar fáil ach in Excel le haghaidh Office 365, Excel 2021, agus Excel 2019.

Chun liosta na gcolún a thiontú go liosta le camóg, roghnaigh cill bhán, mar shampla, an chill C1, agus clóscríobh an fhoirmle seo =TEXTJOIN(", ",TRUE,A1:A7) (A1: A7 an colún a thiontóidh tú go liosta serrated camóg, "" léiríonn sé conas is mian leat an liosta a scaradh). Féach ar an scáileán thíos:


Tiontaigh liosta na gcolún go liosta scartha le camóga le feidhm CONCATENATE

In Excel, is féidir le feidhm CONCATENATE liosta na gcolún a thiontú go liosta i gcill atá scartha le camóga. Déan mar a leanas le do thoil:

1. Roghnaigh cill bhán in aice le chéad sonraí an liosta, mar shampla, an chill C1, agus clóscríobh an fhoirmle seo = CONCATENATE (TRANSPOSE (A1: A7) & ",") (A1: A7 an colún a thiontóidh tú go liosta serrated camóg, '" léiríonn an deighilteoir gur mian leat an liosta a scaradh). Féach screenshots thíos:

2. Aibhsigh an TRANSPOSE (A1: A7) & "," san fhoirmle, agus brúigh an F9 eochair.

3. Bain braces chatach {agus } ón bhfoirmle, agus brúigh an Iontráil eochair.

Anois, feiceann tú gur athraíodh liosta i gcill de na luachanna uile ar an liosta colún agus iad scartha le camóg. Féach an pictiúr thuas.

Déan liosta colún a thiontú go tapa go liosta scartha le camóga le Kutools for Excel

Kutools le haghaidh Excel's Comhcheangail Colúin nó Sraitheanna gan Sonraí a Chailleadh is féidir le fóntais cabhrú le húsáideoirí Excel ilcholúin nó sraitheanna a chomhcheangal in aon cholúin / as a chéile gan sonraí a chailleadh. Ina theannta sin, is féidir le húsáideoirí Excel na teaghráin chomhcheangailte téacs seo a fhilleadh le hiompar nó le filleadh crua.


Tiontaigh liosta na gcolún go liosta scartha le camóga le VBA

Má tá an fheidhm CONCATENATE rud beag tedious duit, is féidir leat VBA a úsáid chun liosta na gcolún a thiontú go liosta i gcill go tapa.

1. Coinnigh ALT cnaipe agus brúigh F11 ar an méarchlár chun a Microsoft Visual Basic le haghaidh Feidhmchláir fhuinneog.

2. Cliceáil Ionsáigh > Modúil, agus cóipeáil an VBA isteach sa mhodúl.

VBA: Tiontaigh liosta na gcolún go liosta scartha le camóga

Sub ChangeRange()
'Updateby20140310
Dim rng As Range
Dim InputRng As Range, OutRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
outStr = ""
For Each rng In InputRng
    If outStr = "" Then
        outStr = rng.Value
    Else
        outStr = outStr & "," & rng.Value
    End If
Next
OutRng.Value = outStr
End Sub

3. Cliceáil Rith cnaipe nó brúigh F5 chun an VBA a reáchtáil.

4. Dialóg ar taispeáint ar an scáileán, agus is féidir leat liosta na gcolún is mian leat a thiontú a roghnú. Féach an pictiúr:

5. Cliceáil OK, ansin tháinig dialóg eile suas chun cill a roghnú. Féach an pictiúr:

6. Cliceáil OK, agus athraíodh na luachanna uile ar liosta na gcolún go liosta atá scartha le camóg i gcill.

Leid: Sa VBA thuas, léiríonn "," an deighilteoir atá uait, agus is féidir leat é a athrú de réir mar is gá duit.


Tiontaigh liosta na gcolún go liosta scartha le camóga le Kutools le haghaidh Excel

Is féidir leat Kutools a chur i bhfeidhm ar Excel freisin Chomhcheangail fóntais chun liosta colún a chur le chéile, agus gach luach a scaradh le camóg go héasca.

Kutools le haghaidh Excel - Supercharge Excel le níos mó ná 300 uirlisí riachtanacha. Bain sult as triail iomlán 30-lá SAOR IN AISCE gan aon chárta creidmheasa ag teastáil! Get sé anois

1. Roghnaigh liosta na gcolún a athróidh tú go liosta scartha le camóga, agus cliceáil Kutools > Cumaisc & Scoilt> Comhcheangail Sraitheanna, Colúin nó Cealla gan Sonraí a chailleadh.

2. Sa bhosca dialóige Oscail Colúin nó Sraitheanna, ní mór duit:
(1) Seiceáil an Comhcheangail sraitheanna rogha sa Cealla roghnaithe a chur le chéile de réir na roghanna seo a leanas alt;
(2) Sa Sonraigh deighilteoir roinn, seiceáil an Deighilteoir eile rogha, agus camóg cineál , isteach sa bhosca seo a leanas;

3. Cliceáil ar an Ok cnaipe.

Anois feicfidh tú go ndéantar na luachanna uile ar an liosta colún sonraithe a chomhcheangal i gcill amháin agus a thiontú go liosta scartha le camóga.

Kutools le haghaidh Excel - Supercharge Excel le níos mó ná 300 uirlisí riachtanacha. Bain sult as triail iomlán 30-lá SAOR IN AISCE gan aon chárta creidmheasa ag teastáil! Get sé anois


Taispeántas: athraigh liosta na gcolún go liosta scartha le camóga in Excel


Kutools le haghaidh Excel: Breis is 300 uirlis láimhe ar do mhéar! Cuir tús le do thriail saor in aisce 30-lá gan aon srianta gné inniu. Íosluchtaigh Anois!

Droim ar ais concatenate agus tiontaigh ceall amháin (liosta serrated camóg) go liosta as a chéile / colún in Excel

De ghnáth is féidir le húsáideoirí Excel an Téacs chuig na Colúin gné chun cill amháin a roinnt ina ilcholúin, ach níl aon mhodh díreach ann chun cill amháin a thiontú go sraitheanna iolracha. Mar sin féin, Kutools for Excel's Cealla Scoilt is féidir le fóntais cabhrú leat é a dhéanamh go héasca mar atá thíos an pictiúr a thaispeántar.



Ailt Choibhneasta:

Comments (34)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
Hi Eric,
Thanks for you feedback. Since the TEXTJOIN is a rather new function, it was not there when we wrote the instruction. I will include the function in the article. Thanks so much.
Amanda
This comment was minimized by the moderator on the site
Major time saving technique - thank you!
This comment was minimized by the moderator on the site
Doesn't work, too many arguments in function.
This comment was minimized by the moderator on the site
This was a life saver! Thanks
This comment was minimized by the moderator on the site
Can someone help in converting a cell wish Value

Football, Baseball, Cricket

into


1. Football, 2. Baseball, 3. Cricket
This comment was minimized by the moderator on the site
Hi ADMINDIVISION,
You can use the Text to Columns (Excel built-in feature) or Split Cells (of Kutools for Excel) to split the cell to three columns or rows, and then apply the Insert Bullets or Numbering feature of Kutools for Excel to quickly insert numbering for the new cells/columns/rows.

Btw, there is an article introducing several solutions to inserting bullets or numberings into cells:https://www.extendoffice.com/documents/excel/950-excel-apply-bullets-numbering.html
This comment was minimized by the moderator on the site
I need to get my numbers to look like this ('1234567', '1234567') instead of ("1234567", "1234567") - any ideas!?
This comment was minimized by the moderator on the site
=SUBSTITUTE(value,CHAR(34),CHAR(39))
This comment was minimized by the moderator on the site
Hi,
There are no double quotas or quotas in the conversation results with any one of methods in this article.
This comment was minimized by the moderator on the site
Absolutely magic!Thanks!
This comment was minimized by the moderator on the site
Used This one: "Convert column list to comma separated list with VBA", worked perfect for converting rows (1000+) of email addresses into a combined list that my email client works well with. Just changed the "," to "; " and it was good to go. Thanks!
This comment was minimized by the moderator on the site
I would like to know how did you manage to copy the comma separated values from Excel Spreadsheet to Outlook/other main client. The reason being whenever I copy, the only formula gets copied but not the comma separated values. Please support.
This comment was minimized by the moderator on the site
Hi, Ravindran, you shold copy the formula result and the paste it into a cell as value firstly, then copy the pased value to other devices.
https://www.extendoffice.com/images/stories/comments/sun-comment/paste%20as%20value.png?1697765930000
This comment was minimized by the moderator on the site
Hi All, So for a few columns this formula is great, but if you were trying to figure this out on more cloumns more than 100. putting "&" is a waste of time. For me i needed sepration through "," (comma). for that, all you need to do is to separate the file in CSV, Open it on a Notepad, Copy and paste in in Word, then Copy again from Word and paste it on Excel. Hope you like to the suggested, Have a great day. Thank you, Mayank Bhargava
This comment was minimized by the moderator on the site
The VBA helped out so much! I am experiencing an issue if you try to close the pop up box or cancel it, it will show that the vba needs debugged. This also happens if the value is blank. Any ideas on how to fix this? Thanks!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations