How do you generate custom rows in excel without V

2019-09-06 08:46发布

I am trying to auto generate manual orders for import. Can this be done in excel without VB?

I am gathering subscription orders on sheet 1, and since it is a physical product being shipped I need to have one order for each non-recurring month. Sheet 1 will be filled by new processing orders, and I would like to be able to export sheet 2 without having to manually create each order.

  • This is the data that I start with on sheet1: Sheet 1 Order Details

enter image description here

  • This is the data that I want to generate on sheet2:

Sheet 2 - To be Exported

enter image description here

1条回答
啃猪蹄的小仙女
2楼-- · 2019-09-06 09:09

You can do with formula, but you will need a little code to keep your eye on the data, as with formula, you'll do say, 1000 rows, then save it, but when your data hits 1001 rows, you need to add a further 1 row, so it can be considered inefficient to have 1000 rows, for 100 rows, but if you quickly get to the limit you've set, you can argue it is eventually efficient.

I've attached a picture

enter image description here

The formula are as follows

D2 filled down =MID(C2,1,FIND(" ",C2,1))

E2 =INT(D2)

E3 filled down =SUM($E$2:E2)+INT(D3)

G2 =A2

G3 filled down =IF(ROW()-2<VLOOKUP(G2,$A$2:$E$4,5,0),G2,INDEX($A$2:$A$4,MATCH(G2,$A$2:$A$4,0)+1,1))

H2 filled down =COUNTIF($G$2:$G2,G2)

I2 filled down =EDATE(VLOOKUP(G2,$A$2:$B$4,2,0),H2-1)

J2 filled down =VLOOKUP(G2,$A$2:$C$4,3,0)

K2 filled down =TEXT(I2,"mmm") & "_" & H2 & "_of_" & COUNTIF($G$2:$G$15,G2) & "-" & G2

Hope this helps

查看更多
登录 后发表回答