Remove blank rows

philb99

Active Member
Joined
Feb 3, 2014
Messages
410
Office Version
  1. 2013
Platform
  1. Windows
Hi

need help with excel spreadsheet which has my header 2 blank rows row of data then 2 blank rows row of data and this carries on all the way down

is there anyway I can remove the blank rows please
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try:
Code:
Sub deleteBlankRows()
    Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
 
Upvote 0
Couple of ways, one to try (make copy of data first):

Insert a column to the left of the first column of data (if I assume this is column A, then insert so that column A is now column B)
In first row enter formula: "=MAX(LEN(B1),1)*ROW()," and copy formula down, then copy and replace with values
If you now sort your data in ascending order by column A, all the blank rows will be at the top, so you have a single section to delete out.

Or top of this link shows how to delete entire rows using Special cells (F5): http://tinyurl.com/y3ngnnnq
 
Last edited:
Upvote 0
Thanks for your help - I presume I don't use the " at the front and end.

I have copied the formula into the created Col A - then Copy and Paste Special - Values - Would that be correct?

If so when I sort Col A, A-Z nothing happens
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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