当大多数人想到在应用程序中对文本进行排序时,他们会想到对Excel 电子表格(Excel spreadsheet)中的单元格进行排序。但是,您可以在Word(Word)中对文本进行排序,只要有内容告诉Word文本的不同部分从哪里开始和结束(text begin and end)。
在本文中,我将向您展示几种在Word中对文本、列表和表格进行排序的方法。请注意,如果您在Excel(Excel)中已有数据,则可以轻松地将Excel 电子表格(Excel spreadsheet)插入到Word 文档(Word document)中。
在 Word 中对列表进行排序
您可以在Word(Word)中对三种类型的列表进行排序。第一种只是一个单词或短语的列表,每个单词或短语占据单独的一行。第二种类型是无序列表或项目符号列表。第三个是有序或编号列表。
在每种情况下,换行符(line break)(也称为回车(carriage return))告诉Word一个单词或短语在哪里结束(word or phrase ends),下一个从哪里开始。这就是Word能够对文档中的文本进行排序的方式。
要对任何这些类型的列表进行排序,首先用鼠标选择列表。只需(Simply)从列表的开头开始,按住鼠标左键(left mouse button),然后拖动鼠标直到整个列表被选中。
然后,单击功能区上的(Ribbon)Home选项卡并找到标题为Paragraph的部分。寻找一个带有字母A和Z以及一个向下箭头的按钮。这是排序(Sort)命令。单击“排序(Sort)”按钮,Word 将打开“文本排序(Sort Text)”窗口。
在“排序文本(Sort Text)”窗口中,您会注意到有许多选项。首先(First),您需要表明您希望按段落对您选择的文本进行排序。即使我们每行只有一个单词,Word仍然认为每一行都是它自己的段落,因为我们按下回车键进入(enter key)下一行。按段落排序是默认选项(default option)。
接下来我们需要告诉Word我们正在排序什么。找到标有Type(Type)的下拉菜单并选择Text。这也是默认选项。
最后,我们需要告诉Word是要按升序(A 到 Z)还是降序(Z 到 A)对文本进行排序。升序(Ascending)是默认选项(default option)。完成后,单击“确定”(OK) 按钮,Word(button and Word)将使用您选择的选项对文本进行排序。
请注意(Notice),现在文本按升序从 A 到 Z 排序。此外,如果您单击“选项(Options)”按钮,您可以配置字段分隔符(field separator)等高级设置以及是否区分大小写。
对表格中的文本进行排序
如果您经常在Excel(Excel)中对数据进行排序,那么这种类型的排序对您来说可能会更熟悉一些。与Excel 工作表(Excel worksheet)非常相似,表格包含行、列,并且可能在第一行中包含标题。幸运的是,Word为您提供了与(Word)Excel中相同的对文本进行排序的灵活性。
假设您在(Suppose)Word中有一个如下所示的表格。
请注意(Notice),第一行中有列标题,并且第一列包含我们希望排序的文本。假设我们这次要按降序对数据进行排序。选择整个表格并再次单击功能区(Ribbon)段落(Paragraph)部分中的排序(Sort)按钮。
请注意(Notice),在排序(Sort)窗口的左下角(hand corner),Word已经检测到第一行中的标题。另请注意(Notice),第一个排序(Sort By)方式下拉菜单的选项框中已经有列标题(column heading)名称(Name)。
除了记住将排序方向(sort direction)更改为Descending之外,其余选项保持不变。完成后,单击“确定”(OK) 按钮,Word(button and Word)将使用我们选择的选项对表格进行排序。
只要您有办法告诉Word是什么将一个数据元素与下一个数据元素分开,在(data element)Word中对文本进行排序就很简单。如果您稍微使用一下排序设置,您会发现您可以在Word 文档(Word document)中使用多列甚至制表符和逗号分隔的文本进行排序。
虽然不如在Excel中排序数据有用,但您可以在Word中节省一些时间,方法是让应用程序使用与Excel 工作表(Excel worksheet)中类似的界面为您排序段落(application sort paragraph)和表格文本。享受!
How to Sort Text in Word
When most people think of sorting text in an application, they think of sorting cеlls in an Excel spreadsheet. However, you can sort text in Word as long as there is something that tells Word where the different parts of tеxt begin and end.
In this article, I’ll show you a couple of ways you can sort text, lists and tables in Word. Note that if you already have data in Excel, you can easily insert an Excel spreadsheet into your Word document.
Sorting Lists in Word
There are three types of lists you can sort in Word. The first kind is simply a list of words or phrases that each occupies a separate line. The second type is unordered or bulleted lists. The third is ordered or numbered lists.
In each of these cases, a line break (also called a carriage return) tells Word where one word or phrase ends and the next one begins. This is how Word is able to sort text in the document.
To sort any of these types of lists, begin by selecting the list with your mouse. Simply start at the beginning of the list, hold down the left mouse button, and drag your mouse until the entire list is selected.
Then, click on the Home tab on the Ribbon and locate the section titled Paragraph. Look for a button with the letters A and Z on it and an arrow pointing down. This is the Sort command. Click on the Sort button and Word will open the Sort Text window.
On the Sort Text window, you’ll notice that there a number of options. First, you need to indicate that you want to sort the text you’ve selected by paragraph. Even though we only have one word per line, Word still considers each line to be its own paragraph because we pressed the enter key to get to the next line. Sorting by paragraph is the default option.
Next we need to tell Word what we are sorting. Locate the drop down menu labeled Type and choose Text. This is also the default option.
Lastly, we need to tell Word whether we want to sort the text in ascending (A to Z) order or descending order (Z to A). Ascending order is the default option. When done, click the OK button and Word will sort your text with the options you chose.
Notice that now the text is sorted from A to Z in ascending order. In addition, if you click on the Options button, you can configure advanced settings like the field separator and whether it should be case sensitive or not.
Sorting Text in Tables
This type of sorting may seem a bit more familiar to you if you often sort data in Excel. Much like an Excel worksheet, a table contains rows, columns, and may contain headings in the first row. Luckily, Word gives you much of the same flexibility to sort text as found in Excel.
Suppose you have a table in Word that looks like the one below.
Notice that there are column headings in the first row and that the first column contains the text we wish to sort. Let’s assume that we want to sort the data in descending order this time. Select the entire table and once again click on the Sort button in the Paragraph section of the Ribbon.
Notice in the bottom left hand corner of the Sort window that Word has already detected the headings in the first row. Notice also that the first Sort By drop down menu already has the column heading Name in the option box.
The rest of the options stay the same except remember to change the sort direction to Descending. When done, click the OK button and Word will sort the table using the options we’ve chosen.
Sorting text in Word is simple as long as you have a way to tell Word what separates one data element from the next. If you play with the sort settings a bit, you will discover that you can sort using multiple columns and even tab and comma delimited text in a Word document.
Although not as useful as sorting data in Excel, you can save yourself some time in Word by having the application sort paragraph and table text for you using a similar interface as found in an Excel worksheet. Enjoy!