+ Reply to Thread
Results 1 to 7 of 7

Invert Selection of Cells

  1. #1
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184

    Invert Selection of Cells

    I'm trying to highlight a bunch of cells in clusters not close together, and then invert the selection so that all cells BUT these are selected (therefore capturing all possible cells that someone could scroll to). In XL03 you could go to File > Invert Selection and it would work fine. But in XL07 which I have now, there doesn't seem to be a way to do it. Also, when using ctrl^a to highlight everything, and while still holding control in XL03 you could de-select specific cells, not so much in 07. I need to know if there's a way to do it with no macros involved. If not, I need a macro to do such a function on any given worksheet. Thanks!
    Last edited by jman0707; 10-10-2008 at 01:33 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I've never heard of a standard feature to invert selection in Excel 2003 or any other version. It's easy enough (but not particularly efficient) to do in VBA, given some particulars.

    Invert the selection with respect to what -- all the cells on the worksheet, the used range, the bounding box of the current selection, or ...?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184
    I would want to invert with respect to all the cells on the worksheet (seen and unseen). At least that's what my application needs now. But I can see use of inverting it with respect to the bounding box of the current cells (only the ones seen). Maybe you could help me with both? I know nothing about VBA, so detailed instructions would be very much appreciated! And I'd like to create buttons to execute the macro if possible. Thanks!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Here are some range set algebra functions you can play with.
    Please Login or Register  to view this content.
    Select some odd collection of cells, and from the VBE Immediate window, try
    Please Login or Register  to view this content.
    Last edited by shg; 10-10-2008 at 04:41 PM. Reason: Correction to RangeBox function

  5. #5
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184
    Awesome thanks!

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Stop back and pick up a fresh copy -- there was an error in the RangeBox function.

  7. #7
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184
    Awesome, did you just edit your post above? I'll grab it.

+ 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. Macro to address cells in the next column to selection
    By miles_muso in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-16-2008, 07:34 AM
  2. Macro to Lock cells in protected sheet depending on criteria
    By Zyphon in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-30-2008, 12:00 PM
  3. Replies: 0
    Last Post: 07-17-2007, 03:23 PM
  4. Block cells for selection
    By Pyrex238 in forum Excel General
    Replies: 1
    Last Post: 07-11-2007, 07:23 PM
  5. Problem Linking Cells in Different Workbooks
    By jeffc4442 in forum Excel General
    Replies: 7
    Last Post: 02-23-2007, 11:01 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