+ Reply to Thread
Results 1 to 8 of 8

Copy and paste dynamic range

Hybrid View

  1. #1
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Copy and paste dynamic range

    I'm guessing the AN column has formulas in it that can result in a blank. A formula such as:
    =if A1<2,"small number,"")

    Using the End(xlUp) method will find the last cell with a formula/entry. You can use the find method to find the last non blank cell.

    FaultLR= Sheets("ReportSummary").Range("AN:AN").Find(what:="*", LookIn:=xlValues, _
                 SearchDirection:=xlPrevious).Row
    Last edited by mdbct; 04-15-2010 at 02:45 PM.

  2. #2
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Re: Copy and paste dynamic range

    Thanks for your response. You're exactly right, there are underlying formulas that are in these cells. I changed the code as you suggested by replacing the line 'FaultLR = Sheets("ReportSummary").Range("AN" & Rows.Count).End(xlUp).Row' with the line you provided but am getting an error "Run-time error '448': Named argument not found. Any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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