java中队列在哪里用了_在Excel中对列而不是行进行排序

java中队列在哪里用了

Usually when you sort data in Excel, you sort the rows, to put them in a different order. For example, you could sort the rows in a Customer list by the customer names in column A. Occasionally, you might need to sort a list horizontally, to put the columns in a different order. Here are the steps for sorting columns instead of rows in Excel, and there's a video too.

通常,当您在Excel中对数据进行排序时,会对行进行排序,以将它们置于不同的顺序。 例如,您可以按A列中的客户名称对“客户”列表中的行进行排序。有时,您可能需要水平对列表进行排序,以将列以不同的顺序放置。 这是在Excel中对列而不是行进行排序的步骤,并且还有一个视频。

不同列中的日期 (Dates in Different Columns)

In this example, I'm working with a data download that dumps the previous 24 months of sales.

在此示例中,我正在处理一个数据下载,该数据转储了过去24个月的销售。

  • The download has no headings -- just the data

    下载没有标题-只是数据
  • The latest data (1 month ago) is in the first column

    第一列是最新数据(1个月前)
  • The oldest data (24 months ago) is in the last column

    最旧的数据(24个月前)在最后一列

In my reports, I want to show the data in chronological order, so I need to reverse the order of the columns.

在我的报告中,我想按时间顺序显示数据,因此我需要颠倒列的顺序。

You could use a macro to sort the columns, if you need to do this frequently, but here are the steps for  manually sorting columns instead of rows.

如果需要经常执行此操作,则可以使用宏对列进行排序,但是这里是手动对列而不是对行进行排序的步骤。

创建临时标题 (Create Temporary Headings)

Here are the steps that I used, to sort the date columns in the Excel list. There aren't any headings on the downloaded data, so I'll add a heading row. Later, the new headings will be used for sorting columns into a different order.

这是我用来对Excel列表中的日期列进行排序的步骤。 下载的数据上没有任何标题,因此我将添加一个标题行。 以后,新标题将用于按不同顺序对列进行排序。

SortHeadings
  1. Insert a blank row above the data, to use for temporary headings

    在数据上方插入空白行,以用作临时标题
  2. In the blank row, type headings above the text column, as placeholders. For example, in the column above the client names, type Client, or simply type Column01.

    在空白行中,在文本列上方键入标题作为占位符。 例如,在客户端名称上方的列中,键入Client ,或仅键入Column01

  3. In the blank row, above the first two columns to be sorted, type 1 and 2. These numbers will be used to create a series of numbers for the sort order.

    在要排序的前两列上方的空白行中,键入12 。 这些数字将用于为排序顺序创建一系列数字。

  4. Select the cells that contain the the two numbers

    选择包含两个数字的单元格
  5. Point to the AutoFill handle at the bottom right of the selected range, and when the pointer changes to a small black cross, drag to the right.

    指向所选范围右下角的“自动填充”手柄,然后当指针变为黑色小十字时,向右拖动。
  6. Drag to the last column that you want to include in the sort. In this example there are 24 columns, so I'll drag across all 24 columns to create heading numbers.

    拖到要包括在排序中的最后一列。 在此示例中,共有24列,因此我将在所有24列中拖动以创建标题编号。

排序列 (Sort the Columns)

The next step is sorting columns, based on the new heading row.

下一步是根据新的标题行对列进行排序。

  • Select all the columns that you want to sort. In this example I'll select columns B:Y, which contain the 24 months of data.

    选择您要排序的所有列。 在此示例中,我将选择B:Y列,其中包含24个月的数据。
  • On the Ribbon's Home tab, click Sort & Filter, then click Custom Sort.

    在功能区的“主页”选项卡上,单击“排序和筛选”,然后单击“自定义排序”。
CustomSortCmd
  • In the Sort dialog box, click Options

    在“排序”对话框中,单击“选项”。
SortOptions
  • In the Sort Options dialog box, click Sort Left to Right, then click OK

    在“排序选项”对话框中,单击“从左到右排序”,然后单击“确定”。
SortOptionsLR
  • From the Sort By drop down list, click on Row 1, because that's where the headings are located.

    在“排序依据”下拉列表中,单击第1行,因为这是标题所在的位置。
SortRow01
  • In this example we want to reverse the column order, so in the Sort dialog box, click the drop down arrow for Order, and select Z to A.

    在此示例中,我们要反转列顺序,因此在“排序”对话框中,单击“顺序”的下拉箭头,然后选择“ Z到A”。
SortZToA
  • Click OK, to sort the columns.

    单击确定,对列进行排序。

After sorting, columns are now in chronological order, with the earliest sales data at the left, and the newest sales data at the right.

排序后,列现在按时间顺序排列,最早的销售数据在左边,最新的销售数据在右边。

As a final step, you can delete the temporary row that contained the headings.

最后,您可以删除包含标题的临时行。

ColumnsReversed

视频:排序列而不是行 (Video: Sort Columns Instead of Rows)

Watch this short video, to see a couple more examples of sorting a list to change the order of the columns, instead of rearranging the rows.

观看这段简短的视频,以观看几个其他示例,这些示例对列表进行排序以更改列的顺序,而不是重新排列行。

演示地址

翻译自: https://contexturesblog.com/archives/2009/05/25/sorting-columns-instead-of-rows-in-excel/

java中队列在哪里用了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值