Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to easily reverse selections of selected ranges in Excel?

Author Kelly Last modified

When working in Excel, it’s common to highlight or select specific cells within a data range for further operation or review. However, sometimes you may find yourself in a situation where you need to quickly invert your current selection: that is, deselect the cells you currently have selected, and select the remainder of the range instead. The following image illustrates such a scenario, demonstrating both the original selection and what it looks like when the selection is reversed:

original data arrow reverse selection

While you could manually perform this reversal by painstakingly reselecting all the other cells by hand, this is tedious and error-prone—especially with large or irregular ranges. Fortunately, Excel allows you to automate or streamline this process using several practical approaches. Below, you’ll find effective methods to quickly reverse selections in Excel, reducing manual effort and helping you avoid mistakes in the process. These techniques are particularly useful when managing lists, preparing data for analysis, or cleaning up large datasets:

Reverse selections in Excel with VBA

Reverse selection in Excel with Kutools for Excel

Reverse selection using a helper column (filter scenarios)

Reverse selection using Go To Special (for blanks or constants)


Reverse selections in Excel with VBA

Utilizing a VBA macro makes the process of reversing a selection straightforward and efficient—even for larger ranges. By leveraging the automation capabilities provided by Excel VBA, you can systematically invert the current selection within your worksheet, selecting exactly the cells that were previously unselected, and deselecting those that were selected. This VBA solution is especially suitable for users comfortable with basic macro operations, and provides flexibility for custom workflows.

1. First, highlight the cells which you wish to reverse—these are the cells currently selected that you want to later deselect.

2. Open the VBA editor in Excel by holding down the Alt + F11 keys. This action will bring up the Microsoft Visual Basic for Applications window, allowing you to work with macros.

3. In the VBA editor, go to the menu and click on Insert > Module. This will create a new module. Paste the provided VBA code for inverting selections into the code window:

VBA for inverting selections

Sub InvertSelection()
'Updateby20250630
Dim rng As Range
Dim Rng1 As Range
Dim Rng2 As Range
Dim OutRng As Range
xTitleId = "KutoolsforExcel"
Set Rng1 = Application.Selection
Set Rng1 = Application.InputBox("Range1 :", xTitleId, Rng1.Address, Type:=8)
Set Rng2 = Application.InputBox("Range2", xTitleId, Type:=8)
For Each rng In Rng2
    If Application.Intersect(rng, Rng1) Is Nothing Then
        If OutRng Is Nothing Then
            Set OutRng = rng
        Else
            Set OutRng = Application.Union(OutRng, rng)
        End If
    End If
Next
OutRng.Select
End Sub
	

4. To run the code, press the F5 key or click the Run button (a green "play" triangle) in the toolbar. When executed, a dialog box will prompt you to select the cells you want to exclude from the future selection. This gives you the flexibility to fine-tune your reversal and prevents accidental reselection. The screenshot below demonstrates what the prompt looks like:

reverse selection with vba code1

5. After choosing the cells you wish to deselect, click OK. A second prompt will then appear, asking you to select the complete range in which you intend to reverse the current selection. Here, choose the total area you want the selection operation to apply to. Refer to the screenshot below for visual guidance:

reverse selection with vba code2

6. Click OK in the final dialog. The operation will complete immediately, and you should now see that the original selection has been inverted—previously selected cells become unselected, and the rest of the range is now actively selected.

reverse selection with vba code result

Notes: The VBA macro operates correctly even in a blank worksheet, giving you flexibility regardless of the data context. For best results, always double-check that the total range you specify is accurate, and that only the intended area is affected—especially when working with large datasets or merged cells. If you encounter errors, ensure macros are enabled, and try saving your workbook first, as VBA changes can’t always be undone via the regular Undo function.

This solution works well for users comfortable with macros and provides a customizable way to automate reverse selections. However, if your environment restricts macros or you prefer a more interactive interface, consider using a specialized add-in such as Kutools for Excel.


Reverse selections in Excel with Kutools for Excel

For those who want to perform reverse selection tasks with just a few clicks, the Select Range Helper feature of Kutools for Excel is a practical and user-friendly solution. With Kutools, you can instantly invert the selection within any specified worksheet range, saving time and minimizing errors compared to manual selection or coding methods. This approach is ideal for users who regularly manage complex workbooks, need to reverse selections frequently, or prefer point-and-click interfaces.

Kutools for Excel includes over 300 practical Excel utilities that simplify daily data management and complex operations. It is free to try with no limitations for 30 days. Get it now.

1. Begin by selecting the cells you want to reverse. This defines your initial selection.

2. On the Excel ribbon, click the Kutools tab, then navigate to Select > Select Range Helper…. This will open the Range Helper dialog box.

3. In the Select Range Helper dialog box, check the Inverse Selection option. This setting tells the tool to swap the selection status of each cell within the specified range—selected cells will be unselected, and unselected cells will become selected. See the screenshot for reference:

reverse selection with kutools

4. With the Inverse Selection option active, click and drag to define the range in which you want to reverse the selection. As soon as you release the mouse button, Kutools will automatically invert the selection within the area—previous selections become deselected, and vice versa. This also works seamlessly across multiple non-contiguous ranges:

reverse selection with kutools result

5. When finished, simply close the Select Range Helper dialog box to complete the process. Your selection is now reversed and ready for further operations like formatting, copying, or deletion.

For more details or additional customization options, please visit the Select Range Helper feature description.

Compared to manual selection methods, using Kutools not only simplifies the process but also reduces the risk of missing or incorrectly including cells—especially when working with large data areas or disjointed selections. The visual and interactive interface ensures transparency and accuracy throughout the operation. 


In summary, whether you choose to use a VBA macro or Kutools for Excel, both methods offer quick and reliable ways to reverse cell selections—freeing you from tedious manual adjustments. For individual or occasional needs, the VBA solution is flexible and can be tailored to specific tasks. Kutools, on the other hand, is recommended for users seeking consistent speed, convenience, and a visual interface, particularly when dealing with complex or frequent selection reversals.

As alternative options, you could also explore:

  • Using helper columns to temporarily track and invert selections (especially in filtering scenarios);
  • Employing advanced selection techniques such as Go To Special for certain types of reversals.

These methods may not directly replace the above workflows, but can be adapted based on specific requirements.


Reverse selection using a helper column (filter scenarios)

For structured data tables where selection is tied to certain values or criteria, you may use a helper column to flag selected rows, and then filter or sort to invert the choice. This approach is especially practical for list-based datasets, such as mailing lists or inventory tables.

1. Add a new helper column next to your data. Mark cells with "1" if selected, leave blank (or "0") if not selected.

2. Apply a filter to the helper column. Filter to show only rows not previously selected ("0" or blank).

3. Select visible cells as the new (inverted) selection.

After completing your operation, you can remove or clear the helper column. This method is simple and doesn’t require macros or add-ins, but is best suited for whole row selections and filter-based workflows. Note that it can be cumbersome with intricate, non-contiguous cell selections.


Reverse selection using Go To Special (for blanks or constants)

Another built-in Excel tool, Go To Special, allows you to select all blank, non-blank, or constants within a defined area. This can simulate a selection reversal, for example, by selecting all blanks in a range after selecting all data cells, or vice versa.

1. Select the target range, then press F5 or Ctrl + G to open the Go To dialog.

2. Click Special… and select the type of cells you want to invert to (e.g., Blanks, Constants).

3. Click OK. Only the specified cells are now selected (effectively inverting your original focus within that category).

This method is especially handy for data cleaning—such as visually separating filled versus empty cells. However, it works only for broad cell types (all blanks, formulas, constants) rather than arbitrary cell selections.


Related articles


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in