Delete Rows Between two Columns

fahadmalik09

New Member
Joined
Jun 1, 2014
Messages
26
Hey Team,

[TABLE="class: grid, width: 50"]
<tbody>[TR]
[TD]Experience[/TD]
[/TR]
[TR]
[TD]V1[/TD]
[/TR]
[TR]
[TD]V2[/TD]
[/TR]
[TR]
[TD]Mobile No:[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Experience[/TD]
[/TR]
[TR]
[TD]V3[/TD]
[/TR]
[TR]
[TD]v4[/TD]
[/TR]
[TR]
[TD]v5[/TD]
[/TR]
[TR]
[TD]Mobile No:[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Experience[/TD]
[/TR]
[TR]
[TD]V6[/TD]
[/TR]
[TR]
[TD]Mobile No:
[/TD]
[/TR]
[TR]
[TD]Experience[/TD]
[/TR]
[TR]
[TD]V7[/TD]
[/TR]
[TR]
[TD]v8[/TD]
[/TR]
[TR]
[TD]v9[/TD]
[/TR]
[TR]
[TD]Mobile No:[/TD]
[/TR]
</tbody>[/TABLE]

I want to delete Values between "Experience" to "Mobile:", ie v1, v2 , v3, v4 .......
Problem is , some has single row below "Experience", some has more than one row below "Experience"

How to delete :confused:
 

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)
What is the error message & on what line?
 
Upvote 0
Turn you filter on, select the blank rows unselect "blank" rows. Then go "File" > "Inspect Workbook" (check for issues), Inspect the document, select the option of "hidden rows" and the hidden rows you filtered out will be automatically deleted.
 
Upvote 0
Its Not Working, after running macro, it Just deleted "Experience" word from sheet.

I find this code too,

Option Explicit

Sub delete_rows()

Application.ScreenUpdating = False

With ActiveSheet

.AutoFilterMode = False

.Range("A1:A" & .Cells(Rows.Count, "A").End(xlUp).Row).AutoFilter _
field:=1, Criteria1:="<>Experience", Operator:=xlAnd, Criteria2:="<>Mobile*"

.Range("A1:A" & .Cells(Rows.Count, "A").End(xlUp).Row).Offset(1, 0).EntireRow.Delete

.AutoFilterMode = False

End With

Application.ScreenUpdating = True

End SubIt deleted all entries including name ,Age....just "Experience" and "Mobile" row remains on the sheet.


Are you saying it's now working?
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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