Copy & Paste

  • Thread starter Thread starter AlanW
  • Start date Start date
A

AlanW

I have a table with the data in Cell B1, C2, D3 & D4, how can I move all
these data to Cell A1:A4. Could anyone please help.

Many Thanks
 
Hi try this

Range("A1") = Range("B1")
Range("A2") = Range("C2")
Range("A3") = Range("D3")
Range("A4") = Range("D4")
 
Hello Howard,

Thank you for help. But can I use a formula to do all of them, actually
there are a lot of data in other cells.

Thanks

"Howard31" 來函:
 
Hello Howard,

I copied data from internet and then paste to Excel as follows:-

A B C D E F

1 -- -- -- -- -- x
2 -- -- -- -- x
3 -- -- -- -- -- x
4 -- -- -- x
and so on

What I want to do is to copy or move x to a new column.

Please show me how to do it by using VB

Thanks

"Howard31" 來函:
 
I assume all of your data is constants and other cells are blank. select
your data sheet and run the macro below, then data will be copied into
column A on the sheet named "Sheet2". if Sheet2 doesn't exist, then this
would fail.

Sub Move2sheet2()
Dim r As Range
Dim i As Long
i = 1
For Each r In Cells.SpecialCells(xlCellTypeConstants)
Worksheets("Sheet2").Cells(i, "A") = r
i = i + 1
Next
End Sub

Keiji
 
Back
Top