Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm trying to get this routine to work, but it's failing on the lin between the ***. I get a runtime error "9" subscript out of rang error. I'm trying to find cells containing "late" and copy tha row,cells A-S into a new page called CertReport. Thanks for an input. Dim x As Long, lr As Long, lr2 As Long lr Application.WorksheetFunction.CountA(Sheets("CRTDA TQ1").Range("A:A")) For x = 1 To lr ***lr2 Application.WorksheetFunction.CountA(Sheets("CertR eport").Range("A:A") + 1*** If Sheets("CRTDATQ1").Cells(x, 11).Value = "late" Then Sheets("CRTDATQ1").Cells(x, 11).Range("A:S").Copy Sheets("CertReport").Select Cells(lr2, 1).Select ActiveSheet.Paste Application.CutCopyMode = False End If Nex ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cell value into blank cells below (full worksheet) | Excel Worksheet Functions | |||
Compare and then copy cell to separate worksheet | Excel Worksheet Functions | |||
Compare two Worksheet and copy the diferent rows to other | Excel Discussion (Misc queries) | |||
Compare a value and if is true copy the line to other worksheet | Excel Worksheet Functions | |||
How do I compare cells and if FALSE compare to next cell in EXCEL | Excel Worksheet Functions |