+ Reply to Thread
Results 1 to 5 of 5

Excel VBA - Issue in Naming Filtered Range on a Filtered List.

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Excel VBA - Issue in Naming Filtered Range on a Filtered List.

    Dear all,

    Regarding naming a Filtered Range.

    I'm facing an issue when the range of values is just one cell.

    PFA for the sheet.

    Debug the function GetUniqueGrades_and_Looping() to understand what I'm trying to do.

    When the Grade " Three\3 " is Filtered and I wanted to select the range of values associated with that Grade.

    It selects the entire column that current Active Cell.

    Need your help in improvising and fixing the code.

    Thanks,
    Vinod Krishna
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often 365, but still time to time use also older versions
    Posts
    8,255

    Re: Excel VBA - Issue in Naming Filtered Range on a Filtered List.

    With one cell filtered-out you got problems here:
    Please Login or Register  to view this content.
    because your Activecell had nothing visible in next rows
    Please Login or Register  to view this content.
    selected everything from the current cell down to the last row.
    could be that oposite direction - the bottom-up could work right
    Please Login or Register  to view this content.
    but I'd rather go for not selecting, but using already found range:

    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Excel VBA - Issue in Naming Filtered Range on a Filtered List.

    Dear Kaper,

    Once again, it's Kaper who has solved my problem!! Brilliant and Efficient

    Now that you have helped me group the Names and name the range.

    Need you help with Naming entire Grades List.

    I can understand that unikaty(i) at each loop will give me each grade.

    I presume dane() has the GradesList.

    Is it possible to consider the array of values as a Range and Name them?

    If so, please help with the code {Would love if it is a few line code}

    Need to implement same logic at work on a huge set of data.

    Hence the request for efficient-come-few lines code

    Thanks,
    Vinod Krishna
    Last edited by Vinod Krishna.C; 02-06-2014 at 11:58 AM.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often 365, but still time to time use also older versions
    Posts
    8,255

    Re: Excel VBA - Issue in Naming Filtered Range on a Filtered List.

    Hi,

    The code works also for large data sets.
    Unikaty holds as many (well there are limits of Visual Basic - but for sure not easy to reach with this class of problems) unique grades values as needed.
    Try it!
    If the data is organised the way it was in the sample file, code would work.

    Press F3 and you can get a list of named ranges as they are defined.
    Do with these named ranges just what you want (I hope you know what you want - otherwise we both just lost time).
    Last edited by Kaper; 02-06-2014 at 11:24 AM.

  5. #5
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Excel VBA - Issue in Naming Filtered Range on a Filtered List.

    Hi Kaper,

    Thank you. I will try based on your suggestion

    I think this would be a new requirement and I will raise a new post for the same.

    Thanks,
    Vinod Krishna
    Last edited by Vinod Krishna.C; 02-08-2014 at 02:09 AM.

+ 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] Selecting a range of blank cells in a filtered list
    By mike_vr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2013, 06:24 AM
  2. Replies: 4
    Last Post: 09-04-2012, 06:09 AM
  3. [SOLVED] Setting a Range Variable to a Filtered List
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-29-2012, 07:06 PM
  4. Naming cells in filtered tables
    By narrowgate88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2010, 02:15 PM
  5. [SOLVED] Define a range containing the first 10 rows of a filtered list
    By Marco in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2005, 09:05 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