如何将行插入另一个工作表的列中?

时间:2015-10-30 20:54:12

标签: excel excel-formula offset worksheet-function

我尝试使用以下列中的重复数据预填充模板: 工作表Sheet:

A1
Offer Name:
Offer URL:
Network:
Payout $:
Share%:

Offer Name:
Offer URL:
Network:
Payout $:
Share%:

...

我喜欢做的是从Sheet2插入数据,这是连续的:Sheet2:

A1      B1      C1          D1  E1
name1   link1   network1    1   5%
name2   link2   network2    1   5%

并预先填充Sheet1,如下所示:

A1          B1
Offer Name: name1
Offer URL:  link1
Network:    network1
Payout $:   1
Share%:     5%

Offer Name: name2
Offer URL:  link2
Network:    network2
Payout $:   1
Share%:     5%

因此,我可以在Sheet1中向下拖动填充物,并将其预填充与Sheet2中的内容一样多。我试过连接,但公式不起作用。

是否可以使用公式?

2 个答案:

答案 0 :(得分:1)

假设Sheet1在A1中以$ ln -s ../../../usr/src/kernels/($(uname -r)/ build 开始,Offer Name:在Sheet2 A1中,请尝试将Sheet1 B1复制下来以适应:

name1

您可以通过选择A1:A12并向下拖动填充手柄来填充Sheet1 ColumnA。如果需要从B6,B12等中删除=OFFSET(Sheet2!A$1,INT(ROW()/6),MOD(ROW()-1,6)) ,请过滤ColumnA以选择0并删除零。如果需要,还可以使用过滤器来格式化百分比。

答案 1 :(得分:0)

If you're in love in keeping your Sheet1 ordered vertically while still listing your fields vertical as well you're going to have to make some allowances. Like Hambone suggested this would be more rigorously done in VBA. If you still prefer to just use formulas here is a potential solution. For each row item in Sheet1 you would use the following formula:

="Offer Name: "&Sheet2!A1&CHAR(10)&"Offer URL: "&Sheet2!B1&CHAR(10)&"Network: "&Sheet2!C1&CHAR(10)&"Payout $: "&Sheet2!D1&CHAR(10)&"Share%: "&Sheet2!E1

The implication is that this will display all the fields for each item in 1 cell with forced carriage returns in between them. This allows you to be able to drag your formula down and capture for all items. You have to set your cells to wrap text to be able to view correctly. Hope this helps. Regards,