Results 1 to 4 of 4

Macro to retain data in Col E

Threaded View

Howardc1001 Macro to retain data in Col E 02-23-2021, 11:02 AM
Fluff13 Re: Macro to retain data in... 02-23-2021, 11:18 AM
Howardc1001 Re: Macro to retain data in... 02-23-2021, 01:01 PM
Fluff13 Re: Macro to retain data in... 02-23-2021, 01:08 PM
  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,880

    Macro to retain data in Col E

    I have written code to retain data containing the following text below in Col E, but cannot get it to work


    1) IG Voucher
    2) Annuity


    It would be appreciated if someone could kindly amend my code


     Sub Retain_Annuity_IGVouchers()
    With Sheets("Imported Data")
    .Range("A2").CurrentRegion.AutoFilter Field:=5, Criteria1:= _
            "<>*Annuity*", Operator:=xlAnd
            
            Range("A2").CurrentRegion.AutoFilter Field:=5, Criteria2:= _
            "<>*IG Voucher*", Operator:=xlAnd
            
            
        .Range("A2").CurrentRegion.Offset(1).EntireRow.Delete
        .AutoFilterMode = False
    End With
     End Sub
    Attached Files Attached Files
    Last edited by Howardc1001; 02-23-2021 at 11:10 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro fix space between data, Macro that takes cell information by name or data.
    By Maickol in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2015, 03:18 PM
  2. Macro template good saved but running macro with imported data problem
    By brazilexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2015, 10:42 PM
  3. automatic macro with linking data in two workbooks, multiple row data to one row data
    By garfield8626 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2013, 01:47 PM
  4. [SOLVED] excel 2007 chart macro graphs data only from sheet on which macro was recorded
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-19-2013, 06:33 PM
  5. Macro to download monthly stock data and to refresh that data with the macro
    By Frankdude in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-23-2011, 08:38 PM
  6. Creating a macro to auto-update external data and time macro was excecuted
    By UNWATCHABLE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2010, 05:21 AM
  7. Optimizing Excel macro to find/replace with the list of data contained in the macro
    By Iceyburnz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2008, 08:41 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