简体   繁体   English

Excel - 将起始列右移 x

[英]Excel - Shift starting column right by x

In excel I have a dataset.在 excel 我有一个数据集。 This represents how much stock of 2 products is sold in the first, second, third, etc... month of the product being on the shelves (starts in A1):这表示在产品上架的第一个月、第二个月、第三个月等...月销售了 2 种产品的库存量(从 A1 开始):

Month       1  2  3  4  5  6  7  8  9  10  11 12
Product 1   3  5  2  1  6  1  2  4  7  2   1  5 
Product 2   2  1  5  6  2  8  2  1  2  3   4  9

However, the first product sales do not always occur in month 1. They occur in month X. Is there a way (not VBA or copy and paste) of shifting the entries right by 'x' so they align with the month.但是,第一个产品销售并不总是发生在第 1 个月。它们发生在 X 月。有没有办法(不是 VBA 或复制和粘贴)将条目右移“x”,以便它们与月份对齐。

Example for data above上述数据示例

Product 1 starts in month 2
Product 2 starts in month 5

Month       1  2  3  4  5  6  7  8  9  10  11 12
Product 1   0  3  5  2  1  6  1  2  4  7   2   1  5 
Product 2   0  0  0  0  2  1  5  6  2  8   2   1  2  3   4  9    

*0 not required (great if possible), but more for illustration 

Thanks谢谢

I have created a simple example that does the same job.我创建了一个做同样工作的简单示例。 The shown formula is copied over the shown cells in the row of new data.显示的公式将复制到新数据行中显示的单元格上。 (The number '2' in the formula refers to the column number of the starting data cell which is column B, hence 2.) (公式中的数字“2”指的是起始数据单元格的列号,即 B 列,因此为 2。)

在此处输入图像描述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM