sfoxbox,
Based on your latest request, and your Private Message, try the following.
Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
Option Explicit Sub GetIncompleteV4() ' stanleydgromjr, 01/24/2012 ' http://www.excelforum.com/excel-programming/809567-macro-help-to-copy-row-from-one-spreadsheet-to-another.html Dim wF As Worksheet, wP As Worksheet, wE As Worksheet Dim c As Range, firstaddress As String, lr As Long, nr As Long Application.ScreenUpdating = False Set wF = Worksheets("Full Report") Set wP = Worksheets("Prioritized Report") Set wE = Worksheets("Executive Summary") wF.Range("A1:J7").Copy wP.Range("A1") wF.Range("A1:E3").Copy wE.Range("A1") lr = wP.Cells(Rows.Count, "D").End(xlUp).Row If lr > 7 Then wP.Range("A8:J" & lr).Clear nr = 8 With wF.Columns(4) Set c = .Find("No", LookIn:=xlValues, LookAt:=xlWhole) If Not c Is Nothing Then firstaddress = c.Address Do wF.Rows(c.Row).Copy wP.Range("A" & nr) nr = wP.Range("D" & Rows.Count).End(xlUp).Offset(1).Row Set c = .FindNext(c) Loop While Not c Is Nothing And c.Address <> firstaddress End If End With wP.Activate Application.ScreenUpdating = True End Sub
Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm
Then run the GetIncompleteV4 macro.
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Hey Stan, I sent you an email but not sure if it went through. You are correct about the executive summary sheet in the workbook. I only need A1:E3 on the full report sheet to copy to this sheet. As for your last question, just want to macro to copy the data once no matter how many times the macro is ran. That is the way it is performing right now, just don't want to loose this. Sorry if this is confusing. Thanks for your help. Scott
Once again Stan, you are the man! Works great. Thanks for you help!
sfoxbox,
Thanks for the feedback.
You are very welcome. Glad I could help.
Come back anytime.
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks