Possible to move data to a specific cell?

  • Thread starter Thread starter Belle
  • Start date Start date
B

Belle

I have a spreadsheet with data pulled from my database. I want to tak
the value in the last cell of each row and move it into a new cell, on
that I specify.
In other words, for each row, take the data in the last column and mov
it to column X, same row. The column to move to will be the same for th
entire sheet
 
Would something like this work?

FirstRow = 5
LastRow = 15
SourceColumn = 2
DestColumn = 9
For CurrentRow = FirstRow To LastRow
Cells(CurrentRow, SourceColumn).Copy
Cells(CurrentRow, DestColumn).PasteSpecial xlPasteValues,
xlPasteSpecialOperationNone
Next 'CurrentRow

HTH
Chris
 
I believe you could copy the entire row and move it to row x.

I have a book at work that shows how to do this... but I hope the idea
helps.

its something to the effect of:

activecell.range("F").copy

activecell.range("X").paste

(mybe you could even cut, or else after you copy, just delete the
entire column?)


Does anyone think this method would work for Belle
 

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