简体   繁体   English

如何使用公式或宏/VBA 自动将包含日期的行中的数据重新排列到 Excel 中的季度列

[英]How to re-arrange the data from rows containing dates to Quarterly columns in Excel automatically either by using formulas or Macros/VBA

I want to re-arrange the data in same excel sheet.我想在同一张 excel 表中重新排列数据。 The data have a column Period Date with dates in it and corresponding ROAA Values.数据有一个 Period Date 列,其中包含日期和相应的 ROAA 值。 I want to rearrange the ROAA values on the basis of Quarters columns picked from Period Date Column.我想根据从 Period Date Column 中选择的 Quarters 列重新排列 ROAA 值。

So that i can have ROAA values on the basis of Quarter and can delete duplicate rows and can have data of one bank in one row only.这样我就可以根据季度获得 ROAA 值,可以删除重复的行,并且只能在一行中包含一个银行的数据。

在此处输入图像描述

I tried using formulas and managed to populate data quarterly, but need help in populating the same bank data in one row only and deleting the rest duplicate rows.我尝试使用公式并设法每季度填充一次数据,但需要帮助才能仅在一行中填充相同的银行数据并删除 rest 重复行。

Use Pivot Tables to resume your data:使用 Pivot 表恢复数据:

在此处输入图像描述

Create a PivotTable to analyze worksheet data 创建数据透视表以分析工作表数据

I took field Issuer Name into rows section, field Value into Values section and Date into Columns Section.我将Issuer Name字段放入行部分,将Value字段放入 Values 部分,将Date放入 Columns 部分。

Note I created a group in the date field, grouping by year and quarter.注意我在日期字段中创建了一个组,按年季度分组。

Group or ungroup data in a PivotTable 分组或取消分组数据透视表中的数据

Pivot Tables is your best option here, because if you add new rows to your table, you just need to update your Pivot Table and it will rearrange everything. Pivot 表是您最好的选择,因为如果您向表中添加新行,则只需更新 Pivot 表,它就会重新排列所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Excel中使用多个关键字重新排列数据 - Re-arrange data with multiple keyword in excel 宏将数据从x列数重新排列为x列数,然后向下复制A和B行中的数据 - Macro to re-arrange data from x number of columns into x number of rows then copy down data in rows A and B 如何重新排列和分组表中的数据 - How to re-arrange and group data from a table 使用公式而不使用宏/ vba在excel中转​​换数据类型 - Converting data type in excel using formulas and without using macros/vba 重新排列数据的宏 - macro to re-arrange data 如何在Excel中将数据重新排列(自动生成)为另一种排列方式? - How do I re-arrange (auto-generated) data into another arrangement in Excel? 如何在Excel中插入空白行而不使用宏复制公式 - how to insert blank rows in excel without copying formulas using macros 如何锁定包含公式的单元格中的数据,以便无法使用VBA在excel中对其进行编辑 - How to Lock the data in a cell containing formulas so that they cannot be edited in excel using vba 如果序列是图表上的一条线(将线移到顶部),则重新排列序列号-VBA / Excel - Re-arrange series number if series is a line (move line to top) on a chart - VBA/Excel 如何使用 excel VBA/宏在网格中填充数组公式(使用多个条件)? - How to use excel VBA/macros to populate array formulas in a grid (using multiple criteria)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM