Copying formula...

  • Thread starter Thread starter marc-andr?
  • Start date Start date
M

marc-andr?

I want to make a "special copying" of a formula in excel.

There it is...

I Have Data in these cells for example : A1, C1, E1, G1, I1, K1, L1...
you understand the patern I guest.

I want to copy all these value, in one column..

Like put all the value with
a "=Formula" that I can copy in A25 to A500 for example.

So retrieve the A1, C1, E1, G1.... value in A25,A25,A27,A28 ... cells.

thanks!

Marc-André
 
M-A

I am not sure if this is what you want, but the following code will take the
value in every other column of row 1 and put them in a column, starting at the
active cell. I am not sure what the limits should be on the number of columns,
so I arbitrarily run through the first 21 columns.

Sub test()

For i = 0 To 20
ActiveCell.Offset(i, 0).Value = Cells(1, 2 * i + 1).Value
Next i

End Sub

Also, your example of A25 to A500 indicates a potential problem. Since you
restricted to 256 columns, and you are only using half the columns, if you
start in A25 you can't have enough data to go beyond ~A150, as I understand it
anyway.

I hope this helps.

Good luck,

Ken
Norfolk, Va
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top