Share via

Inverse Selection

Anonymous
2018-10-11T12:50:58+00:00

Good Morning,

How do you select the inverse of a section of cells in excel?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2018-10-11T13:54:20+00:00

    You can do that (and much more) with my (Developer-) AddIn, watch this video:

    https://www.dropbox.com/s/vbkvbz6r5r4qqh9/ExampleA.wmv?dl=0

    Download it here

    https://www.dropbox.com/s/eow60utqq4nf1gr/AK.zip?dl=1

    After download maybe you have to unblock the file:

    https://blogs.msdn.microsoft.com/delay/p/unblockingdownloadedfile/

    You can also record a macro and get a code that can be used without the AddIn.

    The steps are explained in the help.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2018-10-11T13:47:46+00:00

    You can use a macro:

    Sub InvertSelection()

        Dim r As Range

        Dim c As Range

        Dim s As Range

        Dim n As Range

        Set s = Selection

        Set r = s.CurrentRegion

        For Each c In r

            If Intersect(c, s) Is Nothing Then

                If n Is Nothing Then

                    Set n = c

                Else

                    Set n = Union(n, c)

                End If

            End If

        Next c

        n.Select

    End Sub

    Was this answer helpful?

    0 comments No comments