+ Reply to Thread
Results 1 to 8 of 8

macro to filter a range that has text

  1. #1
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    macro to filter a range that has text

    Hi Gurus,

    I have a column "B" with both numbers and text ...

    i need to filter the cells that has any text and the respective row has to be deleted...

    please help me with a macro

  2. #2
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: macro to filter a range that has text

    Can you upload a sample workbook showing what you are trying to do?

    JimBobBowie

  3. #3
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: macro to filter a range that has text

    hi,

    find attached sample and pls note that if any cell with any text in the range, the respective row has to be deleted...
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: macro to filter a range that has text

    If you add a helper column you could use a formula to test the data and filter on the result. This formula returns TRUE for all numbers (even if entered as text) and FALSE for text. You will need to adjust it to look at your first row of data and then copy it down. I have used row 5.

    Please Login or Register  to view this content.
    JimBobBowie

  5. #5
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: macro to filter a range that has text

    Try this code. It work OK for me.


    Please Login or Register  to view this content.
    JimBobBowie

  6. #6
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: macro to filter a range that has text

    works fine... can u please add the comment for each line of the code.....please

  7. #7
    Registered User
    Join Date
    08-04-2009
    Location
    Golborne England
    MS-Off Ver
    2013
    Posts
    85

    Re: macro to filter a range that has text

    Hi, I have added comment to each line. Hop this helps.

    Please Login or Register  to view this content.

    JimBobBowie

  8. #8
    Forum Contributor
    Join Date
    11-16-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    204

    Re: macro to filter a range that has text

    Thanks so much

+ 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 filter date range
    By Excel_Monkey in forum Excel General
    Replies: 15
    Last Post: 10-02-2014, 09:23 AM
  2. Filter Macro (range contained in filter value)
    By antman10 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-28-2010, 11:09 PM
  3. Macro to apply text to filter
    By nods in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2010, 03:55 PM
  4. Macro Filter Active Range
    By ebbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2010, 07:42 AM
  5. How to filter a range of cells for specific text?
    By talk2mide in forum Excel General
    Replies: 2
    Last Post: 03-01-2007, 05:35 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