How to Bulk Select and Delete Excel Cells Containing Images
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.

- 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.
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.
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.
Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor in Excel.
Click on 'Insert' in the top menu and select 'Module'. This will create a blank canvas for your 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.
Press F5 or click the 'Run' button. The macro will automatically find the images, delete the corresponding cells, and shift your data.

Use Go To Special for Floating Images
If your images are floating above the cells rather than embedded inside them, you can use Excel's built-in Go To Special feature to bulk select and delete them without a macro.
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. Open Your Workbook in WPS: Launch WPS Office and open your spreadsheet containing the images you want to bulk delete.
- 2. Access Developer Tools: Navigate to the 'Developer' tab on the ribbon to access the VBA editor and macro controls.
- 3. Execute the Cleanup Macro: Run your specific cell-deletion script directly within WPS Spreadsheet to effortlessly remove images and shift data upward.

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.




