Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default compare value in cell and copy cells A through S of same row to a new worksheet


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default compare value in cell and copy cells A through S of same row to a new worksheet


I figured out he cause of the error. I had to change the name of shee
1 to CertReport. It's still not copying cells to new page...Any Ideas

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy cell value into blank cells below (full worksheet) SimmoG Excel Worksheet Functions 4 June 3rd 09 11:03 PM
Compare and then copy cell to separate worksheet Matt Excel Worksheet Functions 1 February 6th 09 11:22 PM
Compare two Worksheet and copy the diferent rows to other CC Excel Discussion (Misc queries) 0 December 10th 08 04:48 PM
Compare a value and if is true copy the line to other worksheet Florian Excel Worksheet Functions 2 July 31st 07 09:36 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM


All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"