有很多工作方式,但就flexibility而言,我将使用。 POWER questRY
here which can effortlessly do the auto such Save time and efforts. <代码>Power Query,可在Windows Excel 2010+
和Excel 365 (Windows or Mac)
上查阅。
<>Method UsingExcelps
www.un.org/Depts/DGACM/index_spanish.htm
• 手机G2
=TEXTJOIN({" by ";", "},,TAKE(FILTER(Authorstbl,
CHOOSECOLS(Authorstbl,XMATCH([@Names],Authorstbl[#Headers]))="x",""),,2))
适用<代码>Excel 20
=TEXTJOIN(", ",1,FILTER(Authorstbl[Titles]&" by "&Authorstbl[Authors],
INDEX(Authorstbl,,MATCH([@Names],Authorstbl[#Headers],0))="x",""))
www.un.org/Depts/DGACM/index_spanish.htm 采用<条码>的方法
To use Power Query follow the steps:
- First convert the source ranges into a table and name it accordingly, for this example I have named it as
Authorstbl
- Next, open a blank query from Data Tab --> Get & Transform Data --> Get Data --> From Other Sources --> Blank Query
- The above lets the Power Query window opens, now from Home Tab --> Advanced Editor --> And paste the following M-Code by removing whatever you see, and press Done
let
Source = Excel.CurrentWorkbook(){[Name="Authorstbl"]}[Content],
UnpivotOtherCols = Table.UnpivotOtherColumns(Source, {"Titles", "Authors"}, "Names", "Value"),
RemoveCols = Table.RemoveColumns(UnpivotOtherCols,{"Value"}),
MergeCols = Table.CombineColumns(RemoveCols,{"Titles", "Authors"},Combiner.CombineTextByDelimiter(" by ", QuoteStyle.None),"Merged"),
GroupRowsAndJoin = Table.Group(MergeCols, {"Names"}, {{"In Books", each Text.Combine([Merged],", "), type text}}),
Sorted = Table.Sort(GroupRowsAndJoin,{{"Names", Order.Ascending}})
in
Sorted
- Lastly, to import it back to Excel --> Click on Close & Load or Close & Load To --> The first one which clicked shall create a New Sheet with the required output while the latter will prompt a window asking you where to place the result.