Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
How to copy a cell and horizontally expand the paste along header | Excel Discussion (Misc queries) | |||
Macro to find copy "header" and paste | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Excel: custom header - is it possible to paste into header? | Excel Worksheet Functions |