Results 1 to 13 of 13

Getting to the end of the spreadsheet

Threaded View

  1. #1
    Registered User
    Join Date
    04-17-2010
    Location
    Chula Vista, California
    MS-Off Ver
    Excel 2007
    Posts
    8

    Getting to the end of the spreadsheet

    A macro I use for manipulating data is supposed to go to row 2500 of the spreadsheet and work it's way back up and delete rows if the parameters match. In stead of going to the end, it only goes down to row 130.
    Here's the beginning of the code:

    Public Sub Delete()
    
    
    Dim intRow
    Dim intLastRow
    intLastRow = Range("E2500").End(xlUp).Row
    
    Range("E1").Select
    ' sortall1
      Sheets("all1").Select
    For intRow = intLastRow To 1 Step -1
    Rows(intRow).Select
    If Cells(intRow, 5).Value Like "XX*" And Cells(intRow, 7).Value = "OK" Then
    Cells(intRow, 5).Select
    Selection.EntireRow.Delete
    
    End If
    
    Next intRow
    Any suggestions as to why it won't go to row 2500?
    Last edited by cosber; 03-07-2012 at 07:32 PM. Reason: Solved

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