moving data to different row and cell

C

chris

I am too stupid to know if this is easy or hard - I've imported data from a program which is putting info in 2 rows. Most info is in row 1 (3/5/7/9 etc) cells A - P. But one pesky bit is going to row 2 (row 4/6/8 etc) cell A . Can I move the data in row 2A to row 1Q in one easy way for one or preferably all of the rows? I know I can cut and paste but I would hve to do that about 500 times! HELP! Thanks
 
F

Frank Kabel

Hi
try the following macro if _i understood you correctly:
sub foo()
dim rng as range
dim cell as range
set rng = range("A2:p2")
for each cell in rng
if cell.value<>"" and cell.offset(-1,0).value="" then
cell.offset(-1,0).value = cell.value
cell.clearcontents
end if
next
end sub
 
Top