+ Reply to Thread
Results 1 to 3 of 3

Macro to retain cerain Data in Col A

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Macro to retain cerain Data in Col A

    I have written code to retain all the data containing c:\downloan in Col A and to delete the items not containing this, but cannot get it to work


    Please Login or Register  to view this content.
    It would be appreciated if someone could kindly amend my code
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Macro to retain cerain Data in Col A

    Autofilter considers the top row a header and Row 1 wont be filtered regardless of what is in it.

    The .CurrentRegion method used in your code above doesn't select beyond the empty row 6 in your example data. The .End(xlUp) method below filters all the data in column A.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,873

    Re: Macro to retain cerain Data in Col A

    Thanks for your input and code


    It works perfectly

+ 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. [SOLVED] Macro to retain data in Col E
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2021, 01:08 PM
  2. [SOLVED] macro to retain Cash Deposit in Col D
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2020, 09:57 AM
  3. [SOLVED] macro to retain certain Data
    By flupsie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2018, 03:49 AM
  4. [SOLVED] Macro to retain only certain items
    By flupsie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2017, 07:00 AM
  5. Cut and paste an entire row to another sheet if a cerain criteria is met
    By julia_helena in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2014, 01:53 PM
  6. Need macro to retain the entire row data between two headers in a particular column
    By Nikkishr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-30-2012, 06:41 PM
  7. Retain the Value of a Variable in Macro
    By blueperfume300 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2007, 04:19 AM

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