View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default copy rows based on conditions and insert them into another sheet...

goto a vba moduletype cellstouch f1 key

Cells Property
See AlsoApplies ToExampleSpecifics
Cells Property as it applies to the Application object.

Returns a Range object that represents all the cells on the active
worksheet. If the active document isn't a worksheet, this property fails.
Read-only.

expression.Cells

expression Required. An expression that returns an Application object.

Cells Property as it applies to the Range object.

Returns a Range object that represents the cells in the specified range.
Read-only.

expression.Cells

expression Required. An expression that returns a Range object.

Cells Property as it applies to the Worksheet object.

Returns a Range object that represents all the cells on the worksheet (not
just the cells that are currently in use). Read-only.

expression.Cells

expression Required. An expression that returns a Worksheet object.

Remarks
Because the Item property is the default property for the Range object, you
can specify the row and column index immediately after the Cells keyword.
For more information, see the Item property and the examples for this topic.

Using this property without an object qualifier returns a Range object that
represents all the cells on the active worksheet.

Example
This example sets the font size for cell C5 on Sheet1 to 14 points.

Worksheets("Sheet1").Cells(5, 3).Font.Size = 14
This example clears the formula in cell one on Sheet1.

Worksheets("Sheet1").Cells(1).ClearContents
-- Don GuillettMicrosoft MVP ExcelSalesAid
wrote in message
...
in your line of code
lastrow=cells(rows.count, "a").end(xlup).row+1

what does "a" represent? The column A? or some text I'm supposed to
enter?