問題描述
如何在excel中獲得所需的輸出? (How to get the required output in excel?)
Please tell me how to do the below.
Say I have a single column A. If the data in the 1st 3 rows 1st field is
XPWCS432, XPWCS440, XPWCS394, XPWCS395, XPWCS396, XPWCS397, XPWCS398, XPWCS399, XPWCS476, XPWCS390, XPWCS391
XPWCS432, XPWCS470
XPWCS432, XPWCS434, XPWCS312, XPWCS313, XPWCS314, XPWCS315, XPWCS316, XPWCS317, XPWCS318, XPWCS319, XPWCS320, XPWCS321, XPWCS322, XPWCS323, XPWCS324, XPWCS325, XPWCS326, XPWCS327, XPWCS328, XPWCS329, XPWCS330, XPWCS331, XPWCS372, XPWCS332
The output data should be like below
1)with out leading and traiiling comma 2)No spaces between values,no duplicates and values should be comma seperated
The below conditions should be achieved.
1) Remove the ,(comma) if it appears at the starting of string. 2) Remove any blank spaces in the string. 3) sort the string words in ascending and remove the duplicate words in the string.
The data(words) in the field are changing from row to row i.e column1 row1 field1 may contain 3 words row2 field1 may contain 10 words row3 field1 may contain 20 words like this there may be say some 100 rows. Thanks, Srihai
‑‑‑‑‑
參考解法
方法 1:
I Should propose record the following macro of excel commands:
- Text to columns, with "space" and "comma" as delimiter to remove them.
- Traspose the data row to a data column.
- Remove Duplicates and sort of data.
- Traspose the data column to a data row.
(by user840963、Alen)