# Copy every other row

#### eqbal

##### Board Regular
HI

I have a worksheet and I want to copy the contents of every other row for 400 rows like below with drag and fill. Excel does not understand the algorithm. How can I do that? It's 400 rows!! This goes on for columns B to F too. Pls help.

[A2]=IF(H2<>"",H2,"")
[A3]=IF(H4<>"",H4,"")
[A4]=IF(H6<>"",H6,"")
.
.
.
[A400]=IF(H800<>"",H800,"")

### Excel Facts

If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

#### NdNoviceHlp

##### Well-known Member
I'm fairly sure U need to use vba. If U want some code please specify exactly what sheet, columns and rows U want transferred as well as exactly where U want them to go. HTH. Dave

#### Jonmo1

##### MrExcel MVP
Try

=IF(INDEX(H:H,(ROWS(A\$1:A1)-1)*2+2)="","",INDEX(H:H,(ROWS(A\$1:A1)-1)*2+2))

DON'T change the A\$1:A1 reference, it's not related to your data.

#### Jonmo1

##### MrExcel MVP
What type of data is in column H, if it's text this can be simplified greatly

=T(INDEX(H:H,(ROWS(A\$1:A1)-1)*2+2))

#### yujin

##### New Member
Modify your formula like below and drag & fill

[A2]=IF(INDIRECT("H"&(ROW(A2)-1)*2)<>"",INDIRECT("H"&(ROW(A2)-1)*2),"")

Replies
0
Views
27
Replies
18
Views
130
Replies
13
Views
131
Replies
7
Views
55
Replies
3
Views
85