Results 1 to 5 of 5

Row Deletion w/ VBA

Threaded View

  1. #1
    Registered User
    Join Date
    02-05-2016
    Location
    pennsylvania
    MS-Off Ver
    2011
    Posts
    10

    Row Deletion w/ VBA

    I am trying to write a VBA that deletes the Row if column U = "Delivered". Column U is an index/match function pulling from another workbook and I've added the text function but I still keep running into the same error of no match. Any additional conversions I put into the VBA really slows down the running of it because it is going from line to line and there are like 40,000 lines. Is there a better way I could be doing this.Here is that code below and a sample file attached.

    Sub deleteRows()

    Dim lastRow As Long
    Dim i As Long

    lastRow = Cells(Rows.Count, "U").End(xlUp).Row

    For i = lastRow To 1 Step -1
    If Cells(i, "U").Value = "Delivered" Then
    Rows(i).Delete
    End If
    Next i

    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Duplicate deletion macro does not match number of rows for deletion by hand
    By Ianmacros in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2019, 06:07 PM
  2. Prevent workbook deletion or create the copy upon the deletion?
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2014, 04:35 PM
  3. #REF after row deletion
    By ScottyHez in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2014, 05:05 AM
  4. row deletion
    By jusciusr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-19-2013, 10:08 AM
  5. Row deletion
    By mtfd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2011, 11:15 AM
  6. No Deletion!
    By Peanut_M in forum Excel General
    Replies: 2
    Last Post: 01-11-2011, 05:31 AM
  7. Row Deletion
    By ringrim in forum Excel General
    Replies: 1
    Last Post: 08-20-2008, 05:21 PM

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