delete gap lines

majidsiddique

Board Regular
Joined
Oct 22, 2018
Messages
164
Dear,

i have problem in excel. how i can remove quickly line delete in S.No column (B). there is a gap between lines, excel can identify automatic gap line and delete them immediately. data is too lengthy. only S.No column(B) is main criteria in a sheet.



[TABLE="width: 334"]
<colgroup><col span="2"><col><col span="2"></colgroup><tbody>[TR]
[TD]Item[/TD]
[TD]S.No[/TD]
[TD]Description [/TD]
[TD]Lot[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD]12010[/TD]
[TD]1[/TD]
[TD]teri towel[/TD]
[TD]12111110 [/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]2[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]3[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]4[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]5[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]6[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]7[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]8[/TD]
[TD]teri towel[/TD]
[TD]12111110[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]30010[/TD]
[TD]1[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]2[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]3[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]4[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]5[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]6[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]7[/TD]
[TD]wingles[/TD]
[TD]2001889[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]8[/TD]
[TD]wingles[/TD]
[TD]8899888[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]9[/TD]
[TD]wingles[/TD]
[TD]8899888[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]40010[/TD]
[TD]1[/TD]
[TD]driver22[/TD]
[TD]55551[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]2[/TD]
[TD]driver22[/TD]
[TD]55551[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]3[/TD]
[TD]driver22[/TD]
[TD]66662[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]5[/TD]
[TD]driver22[/TD]
[TD]66662[/TD]
[TD]12[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
If the "gap" in Column B is a truly blank cell (absolutely nothing in it), then this macro should work fairly quickly...
Code:
Sub DeleteGapRows()
  Columns("B").SpecialCells(xlBlanks).EntireRow.Delete
End Sub
 
Last edited:
Upvote 0
Dear Rick,

is it possible to remove any cell value selected gap lines first then apply to delete line? like selected gap lines volume D cell value " hhhh " and E " yuuu"

kindly tell me.

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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