+ Reply to Thread
Results 1 to 4 of 4

Check for Last Used cells

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2014
    Location
    London
    MS-Off Ver
    2003,2010
    Posts
    3

    Check for Last Used cells

    I want to find last used cells
    Dim LastRow
            LastRow = sheet.Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=Microsoft.Office.Interop.Excel.XlSearchDirection.xlPrevious)
            MsgBox(LastRow)
    My code not working ..
    Please help me

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Check for Last Used cells

    what is that code meant to do?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    07-01-2014
    Location
    London
    MS-Off Ver
    2003,2010
    Posts
    3

    Re: Check for Last Used cells

    I'm using Find Command. I want to search backwards by Rows but my code not working

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,543

    Re: Check for Last Used cells

    Try this maybe.
    Dim lr As Long
    lr = Cells.Find(What:="*", SearchOrder:=xlRows, _
     SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. possible to check for file in multiple folders, then check for values in specific cells?
    By mattheritage in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2014, 08:33 AM
  2. Automatically check one or more check boxes when a parent check box is manually checked
    By Steverizer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2013, 01:56 PM
  3. Replies: 0
    Last Post: 03-21-2013, 02:46 AM
  4. [SOLVED] Need cells from Worksheet1 to check corresponding cells in worksheet2 and respond
    By publius190 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2012, 06:19 PM
  5. Check for cells that reference empty cells?
    By leaning in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-19-2010, 04:19 PM

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