Results 1 to 5 of 5

Macro that copys the last row on two worksheets

Threaded View

neofrey Macro that copys the last row... 06-12-2012, 12:33 PM
Thalassa Re: Macro that copys the last... 06-12-2012, 12:52 PM
JoeMo Re: Macro that copys the last... 06-12-2012, 12:53 PM
JBeaucaire Re: Macro that copys the last... 06-12-2012, 12:54 PM
neofrey Re: Macro that copys the last... 06-12-2012, 01:23 PM
  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Kanab
    MS-Off Ver
    Excel 2007
    Posts
    9

    Macro that copys the last row on two worksheets

    The below formula is giving me a Compile error: Duplicate declaration in current scope. How can a change the second part of this macro so it doesn't give me the error? I know I could keep them seperate but I'm sure there is a solution.

    Thanks in advance.

    Sheets("Moderate").Select
        Dim LastRow As Long
      LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
      Rows(LastRow).Copy Cells(LastRow + 1, "A")
      Rows(LastRow).Value = Rows(LastRow).Value
      
      Sheets("Moderate AccDiv").Select
        Dim LastRow As Long
      LastRow = Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
      Rows(LastRow).Copy Cells(LastRow + 1, "A")
      Rows(LastRow).Value = Rows(LastRow).Value
    Last edited by neofrey; 06-12-2012 at 01:20 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1