+ Reply to Thread
Results 1 to 2 of 2

automatically selecting only specific visible cells in a filtered range

  1. #1
    Forum Contributor
    Join Date
    07-07-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    256

    Post automatically selecting only specific visible cells in a filtered range

    Hai guys

    I am having a filtered range say a3:a30
    after filtering my cells will look like below
    A B
    a5 1
    a8. 4
    a9 3
    a20 2
    a24 1
    a25 1

    what i want is when i click/select a cell in the filtered column A,on the basis of value in colomn B
    the number of cells below the selected cell including the active cell should get selected.

    Example when i click a8 cell,a8,a9,a20,a24 have to be selected,here four cells are selected bcoz the corresponding value in b8 cell is 4.

    when i use the method below

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    if target .column= 2 then
    activecell.select
    Range(selection,selection.cells(activecells.offset(0,1).value,0).specialcells(XlcellTypeVisible).select
    end if
    Exit sub
    Please Login or Register  to view this content.
    it selects invisible cells also a8,a9,a10,a11
    Can any one help to solve this issue

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: automatically selecting only specific visible cells in a filtered range

    Hi catchnanan


    Please attach a sample workbook the Structure of which is the same as your actual workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    INCLUDE ANY CODE YOU'RE USING OR HAVE TRIED.

    Remember to desensitize the data.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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] Filtered Cells To Automatically Move Visible Cells To Top Of Table..?
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2017, 05:55 AM
  2. Copying all visible cells from filtered range in one sheet onto another
    By vpan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2016, 05:11 PM
  3. [SOLVED] Fill number series down a filtered range in visible cells only
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2016, 01:01 PM
  4. Issue with Looping Filtered Range of Visible Cells
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2015, 06:52 PM
  5. Copy Visible Cells Using Offset.Value in a Filtered Range
    By PreLives in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2014, 01:09 PM
  6. Selecting 2nd to last Visible row in a filtered list
    By PSBuskey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-11-2013, 04:43 PM
  7. average of visible cells in a filtered range
    By dave roth in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2005, 08:06 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