Problem Deleting Cells

Can_This_Be_Don

Board Regular
Joined
Feb 15, 2005
Messages
88
Have set up a user form that allows me to add records to a spreadsheet. Sometimes the new record button is hit and no data is actually input. Even so this creates a record on the spreadsheet.

If I use the filter button this shows the blank row and I can delete the record. As I need to automate the procedure I've tried using various suggestions I've found on the forum but they do not seem to work.

The last piece I found suggested using this code:

Columns("I:I").SpecialCells(xlCellTypeBlanks).EntireRow.Delete

This does not seem to delete the blank records as an error comes up saying "No cells were found" even though they appear using the filter.

Can anyone please help. :x

Don
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
what Colmn are the blanks located in ?? What Column are you using to filter by ... is the entire row blank ? If the entire row is blank why are you attempting to delete it ?
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top