Results 1 to 3 of 3

Thread: Need Code

  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Need Code

    I currently have the following code that deletes the referenced language in column A. I would also like to include column B as well:Sub TotalOrServiceRequesterRows() With Columns("A") .Replace "*Total*", "#N/A", xlWhole .Replace "*Service Requestor*", "#N/A", xlWhole .Replace "*Service Requester*", "#N/A", xlWhole .Replace "*SR Contract*", "#N/A", xlWhole .Replace "*Sabine Customer Service*", "#N/A", xlWhole .Replace "*IMB*", "#N/A", xlWhole .Replace "*Accounting*", "#N/A", xlWhole On Error Resume Next .SpecialCells(xlConstants, xlErrors).EntireRow.Delete On Error GoTo 0 End WithEnd SubAny ideas?Thanks in advance.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Try using Range("A:B") instead of Columns("A")
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    thanks Rory

Posting Permissions

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