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.



ItemS.NoDescription LotQty
120101teri towel12111110 2
2teri towel121111102
3teri towel121111102
4teri towel121111102
5teri towel121111102
6teri towel121111105
7teri towel121111105
8teri towel121111105
300101wingles20018896
2wingles20018896
3wingles20018896
4wingles20018896
5wingles20018897
6wingles20018897
7wingles20018897
8wingles88998889
9wingles88998889
400101driver225555112
2driver225555112
3driver226666212
5driver226666212

<colgroup><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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,214,923
Messages
6,122,283
Members
449,075
Latest member
staticfluids

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