logo
search
Document Editing Problems

How to Bulk Select and Delete Excel Cells Containing Images

Steve KSteve K Sep 28, 2026 871 views

Question details

The user needs to bulk select and delete cells that contain images, specifically handling the difference between in-cell images and floating shapes.

How to Bulk Select and Delete Excel Cells Containing Images
Product
Excel
Device & OS
not provided
Scenario
Cleaning up a large spreadsheet where numerous images are embedded directly into cells, requiring the removal of both the images and their corresponding cells.
Observed behavior
Excel's standard 'Find and Select > Objects' command fails to identify or select images that are inserted directly into cells, preventing standard bulk deletion methods from working.
Before you start

Verify whether your images are floating objects or embedded directly into the cells (in-cell images), as standard object selection cannot detect in-cell pictures. Always save a copy of your workbook before proceeding, because running VBA macros clears your undo history and cannot be reversed.

Solution 1Recommended

Use a VBA Macro to Delete In-Cell Images and Shift Data

Because standard tools ignore in-cell images, a specialized VBA macro is the most effective way to identify the correct image types, remove them, delete the parent cells, and shift the remaining data upward.

Standard object-selection code (like targeting 'Shapes') may not work with modern in-cell images. You must ensure the VBA script is specifically designed to loop through the exact image type present in your workbook, delete the cell that houses the image, and shift the rows.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor in Excel.

2
Insert a New Module

Click on 'Insert' in the top menu and select 'Module'. This will create a blank canvas for your script.

3
Paste the Deletion Script

Paste your specialized VBA code that targets in-cell pictures. Ensure the code includes instructions to delete the parent cell (e.g., Picture.TopLeftCell.Delete) and includes the 'Shift:=xlUp' parameter to shift remaining data upward.

4
Run the Macro

Press F5 or click the 'Run' button. The macro will automatically find the images, delete the corresponding cells, and shift your data.

Use a VBA Macro to Delete In-Cell Images and Shift Data
Macro Targeting: If the code fails to find the images, they might be formatted as a different object type. You may need to modify the script to target 'Pictures' or 'Shapes' depending on how they were originally inserted.
Advanced Spreadsheet Management

Efficiently Manage Images and Macros with WPS Spreadsheet

WPS Spreadsheet offers robust support for VBA macros and advanced object management, allowing you to easily handle complex tasks like bulk deleting in-cell images and shifting data perfectly.

  1. 1. Open Your Workbook in WPS: Launch WPS Office and open your spreadsheet containing the images you want to bulk delete.
  2. 2. Access Developer Tools: Navigate to the 'Developer' tab on the ribbon to access the VBA editor and macro controls.
  3. 3. Execute the Cleanup Macro: Run your specific cell-deletion script directly within WPS Spreadsheet to effortlessly remove images and shift data upward.
Fully compatible with Microsoft Excel file formats (.xlsx, .xlsm, .xls)Seamless support for executing VBA macros to bulk delete in-cell objectsIntuitive Find and Select tools for standard floating shapesFree, lightweight, and incredibly fast for large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't 'Find and Select > Objects' highlight all the images in my spreadsheet?

Excel differentiates between floating shapes and in-cell images. The 'Find and Select > Objects' tool is designed to identify floating objects that hover over the grid. It ignores images that are strictly embedded within the cell boundaries.

Can I undo the changes made by a VBA macro?

No, running a VBA macro clears Excel's undo history. Any cells or images deleted by the script cannot be recovered using Ctrl+Z. Always create a backup copy of your file before running a new macro.

How do I convert an in-cell image to a floating object?

Right-click the cell containing the embedded image, look for the picture options in the context menu, and select 'Place over Cells'. This will convert the image into a floating shape that can be selected using the standard object selection tools.

Does WPS Office support macros for deleting image cells?

Yes, WPS Spreadsheet supports VBA macros in its professional and macro-enabled versions, allowing you to run identical VBA scripts to identify pictures, delete their parent cells, and shift the remaining cells up.