+ Reply to Thread
Results 1 to 20 of 20

select all cells in between two named range

  1. #1
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    select all cells in between two named range

    hi ,
    i am trying to select all cells in same column which are in between/including two named ranges.
    first : team members
    second is space , blank cell ....
    also this named ranges occur multiple times in same column .
    so i want to make sure it is selected as many times it occurs .
    for example : first time it occurs in between a1:a15 second time in between a20:28 and so on ....

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    Is this the same requirement as per this post....
    https://www.excelforum.com/excel-pro...ific-text.html
    See upload...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 07-26-2017 at 04:30 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    hi , i think theres some confusion ,
    i have attach sample file for better understanding .
    plz check
    Attached Files Attached Files

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    Please Login or Register  to view this content.
    Last edited by sintek; 07-26-2017 at 08:14 AM.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    With the Union Select at end of above code...to select all stored ranges, it is dependant upon value of ii after loop so won't really work...Any ideas on a fix
    Last edited by sintek; 07-26-2017 at 08:13 AM.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    .....................................
    Last edited by sintek; 07-26-2017 at 08:12 AM.

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    .....................................

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: select all cells in between two named range

    Maybe:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    hi , yes its not working ....also there are many cell having text as "team members" and blank/empty cell after that ...

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: select all cells in between two named range

    Quote Originally Posted by raj soni View Post
    hi , yes its not working ....also there are many cell having text as "team members" and blank/empty cell after that ...
    Are you referring to Post #8?

  11. #11
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    not working , thanks for giving it try

  12. #12
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    yes both not working

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: select all cells in between two named range

    Worked for me on your sample in Post 3. What do you want to do once the cells are selected?

    This colors the ranges red:

    Please Login or Register  to view this content.

  14. #14
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    See amended code....
    Selects all required ranges at once as per request...
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    Quote Originally Posted by sintek View Post
    See amended code....
    Selects all required ranges at once as per request...
    Please Login or Register  to view this content.
    hi , i am getting error " subscript out of range "

  16. #16
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    Works on your upload file...Upload file you are testing...

  17. #17
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    Quote Originally Posted by JOHN H. DAVIS View Post
    Worked for me on your sample in Post 3. What do you want to do once the cells are selected?

    This colors the ranges red:

    Please Login or Register  to view this content.
    HI , thanks mr.john ....its working ....

  18. #18
    Forum Contributor
    Join Date
    04-25-2014
    Location
    India
    MS-Off Ver
    Excel pro plus 2021
    Posts
    186

    Re: select all cells in between two named range

    thanks mr.john and mr.sintek.....you saved my time

  19. #19
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: select all cells in between two named range

    So what happened to wanting to select all ranges at once....

    See this thread I posted...very similar to a cross post...but Not.....It was driving me insane...CK176 perfect solution...
    https://www.excelforum.com/excel-pro...ml#post4706865
    Last edited by sintek; 07-26-2017 at 12:53 PM.

  20. #20
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: select all cells in between two named range

    You're welcome. Glad to help out and thanks for the feedback and the reps.

+ 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] Compare cells to named range and create new sheets using related named range
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2015, 03:35 PM
  2. Select cell from a named range
    By Spagbog in forum Excel General
    Replies: 2
    Last Post: 09-09-2011, 09:04 AM
  3. Select Which Named Range to Use in a Function
    By JimmyA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2008, 07:25 AM
  4. Select the named range to use in a function
    By JimmyA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-07-2008, 07:04 AM
  5. Replies: 1
    Last Post: 06-03-2006, 10:55 PM
  6. Compare a selected Range with a Named range and select cells that do not exist
    By PCLIVE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 03:05 PM
  7. Select cells based on named Range and a column heading
    By achidsey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2005, 11:05 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