View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Donnie Stone Donnie Stone is offline
external usenet poster
 
Posts: 35
Default Need Help - Copy/Paste & Header Row

I have a header in row 1. Is it possible to modify the code so it excludes
it and starts executing in cell A2 for example?

"pk" wrote in message
...
I'm not sure what your criteria are, but the following
will do what you want, acting on any non-blank cell
encountered. Write lines three and four on one row in
your module:

For Each cell In ActiveSheet.UsedRange.Columns(1).Rows
If cell.FormulaR1C1 < "" Then
cell.Copy Destination:=Sheets("Sheet2").Range
("A1")
End If
Next cell

Hope this helps...

-----Original Message-----
I'm looking for a simpler way of doing the following:

Sub CopyCell()
Sheets("SHEET1").Range("A1").Copy Sheets

("SHEET2").Range("A1")
Sheets("SHEET1").Range("A2").Copy Sheets

("SHEET2").Range("A1")
Sheets("SHEET1").Range("A3").Copy Sheets