Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

excel - How to move data in colum 1 to odd positions in column 2?

I have a big data and I would like to move data from column 1 to odd positions in column 2 (see the picture). Thanks in advance for your help!

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you only need to do this once:

  • Insert a new column
  • enter the numbers 1 and 3 into the first cells next to the first two data items
  • use the fill handle to drag down with incrementing in steps of 2, so all data items have an odd number in the neighbouring column.
  • in the same column, below the last odd number, enter 2 and in the next row 4
  • use the fill handle and drag down until you have a number bigger than the last odd number.
  • Now select the data column and the numbers and sort by the numbers column.
  • move to your desired position and delete what you no longer need.

You can also use a formula along these lines:

=IF(INT(ROW()/2)=ROW()/2,INDEX(A:A,ROW()/2),"")

Then copy and paste as values over the data.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...