Delete GAPS in columns

sauvage

New Member
Joined
Dec 20, 2011
Messages
25
To Whom it May Concern,

I have around 2368 rows for in each column and I have around 8 columns and what I need to do is to remove any gaps. I do not know how to attach picture here, but I can explaing it in words.

A1: 0.9
A2:
A3:
A4:
A5: -0.09
A6:
A7: 0.4

Is there a way to eliminate those gaps (A2, A3, A4, A6...) in one go?

I would much appreciate your help as it would save me loads of time.

Kind Regards,

Dim
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to the board.

You can highlight the column
Press CTRL + G
Cick Special
Select Blanks
Click OK
Right click any highlighted cell
Delete

Hope that helps.
 
Upvote 0
Try

Code:
Sub btest()
Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
 
Upvote 0
Is this a one-time situation or one which you will need to do with frequency?
 
Upvote 0
Try

Code:
Sub btest()
Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub

I am not very proficient in excel, so would be grateful if you could explaing where to put this code.

Kind regards
 
Upvote 0
Press ALT + F11, select Module from the Insert menu, paste in the code. Press ALT + Q, press ALT + F8 then double click btest
 
Upvote 0
Welcome to the board.

You can highlight the column
Press CTRL + G
Cick Special
Select Blanks
Click OK
Right click any highlighted cell
Delete

Hope that helps.

That did work. Never knew it can be so easy. Thank you very much for your help.

Thanks to every one who tried to help I appreciate this.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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