Results 1 to 3 of 3

How to apply filter to a specific range and do stuff with it.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    How to apply filter to a specific range and do stuff with it.

    I'd like to add on to my sub by adding a filter to A6:G6 (first it should clear all filters currently applied, if any)

    After that, I would like to filter out all the #N/A in the C and D columns then enter the value 'TEST' in all of the F column.

    Then display everything but the #N/A values (once again, C/D columns).


    In the future, should I simply record a macro and see what happens, or is it safer to simply ask here? I figure there will be more efficient answers posted here. Unfortunately, I know next to nothing about macros, still learning.

    I'd also like to combine it with this macro I currently have (which should be run last) feel free to improve upon it if you see fit:

    Sub InsertPageBreaks()
    'reset manual breaks
      ActiveSheet.Cells.PageBreak = xlPageBreakNone
    'insert breaks based on helper column
      Dim c As Range
      For Each c In Range("A1", Range("A" & Rows.Count).End(xlUp))
        If c.Offset(1).Value <> "" And c.Offset(1).Value <> c.Value Then _
          ActiveWindow.SelectedSheets.HPageBreaks.Add c.Offset(1)
      Next c
    End Sub
    Thanks, as always, in advance. Love how helpful everyone is.
    Last edited by TheN; 10-31-2016 at 08:27 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code that will re-apply my formula to the specific range of cells
    By glenn0004 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-29-2015, 08:49 AM
  2. [SOLVED] Dynamic range... stuff...
    By slaquer in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-29-2014, 08:22 PM
  3. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  4. [SOLVED] Macro to temporarily unprotect sheet to apply filter to locked cell range, then reprotect?
    By lsargent in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2013, 10:27 AM
  5. How to use Countif with range and specific filter
    By dystop1a in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2013, 06:56 PM
  6. [SOLVED] How to filter in a specific range in Excel 2010
    By nemo66ro in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2012, 11:18 AM
  7. 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