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:
 
Dear Rick,

Yes Mobile1 , Mobile2 are real numbers
The only common word is "experience"

like

A1 Name : XYS
A2 Age : 38
A3 Experience
A4 Done Diploma
A5 Engineering in CS
A6 Mobile No : 123456789
A7 Address : cb club gate
A8 Mobile No : 987654321
A9
A10 Name : ABC
A11 Age : 42
A12 Experience
A13 Done Masters
A14 Doing PHD
A15 Certificate course in Electronics
A16 Mobile No : 123456789
A17 Address : River Valley
A18 Mobile No : 123456789

:mad:
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Does the word "Mobile" actually exist as the first word in the cell?
Also do all groups have this as the last 3 lines
Mobile No : ????
Address : ????
Mobile No : ????


or can the be other variations?
 
Upvote 0
Yup
"Mobile No :" is common word in all cell
"Address :" is common word in all cell

Looks like

Mobile No : 987654321
Address : RIver Valley , NJ

Mobile No: 123456790
Address : Park Avenue , Au

"Mobile No: " and "Address :" are the first Word which is common
 
Upvote 0
If I start of with

Excel 2013/2016
A
Name : XYS
Age : 38
Experience
Done Diploma
Engineering in CS
Mobile No : 123456789
Address : cb club gate
Name : ABC
Age : 42
Experience
Done Masters
Doing PHD
Certificate course in Electronics
Mobile No : 123456789
Address : River Valley

<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: center"]10[/TD]

[TD="align: center"]11[/TD]

[TD="align: center"]12[/TD]

[TD="align: center"]13[/TD]

[TD="align: center"]14[/TD]

[TD="align: center"]15[/TD]

[TD="align: center"]16[/TD]

</tbody>
Sheet1



I end up with

Excel 2013/2016
A
Name : XYS
Age : 38
Mobile No : 123456789
Address : cb club gate
Name : ABC
Age : 42
Mobile No : 123456789
Address : River Valley

<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]

[TD="align: center"]9[/TD]

</tbody>
Master

Are your values in col A & do they look EXACTLY like the samples you have given?
 
Last edited:
Upvote 0
Dear Rick,

Yes Mobile1 , Mobile2 are real numbers
The only common word is "experience"

like

A1 Name : XYS
A2 Age : 38
A3 Experience
A4 Done Diploma
A5 Engineering in CS
A6 Mobile No : 123456789
A7 Address : cb club gate
A8
A9 Name : ABC
A10 Age : 42
A11 Experience
A12 Done Masters
A13 Doing PHD
A14 Certificate course in Electronics
A15 Mobile No : 123456789
A16 Address : River Valley
:mad2:

Some correction of above comment.
 
Upvote 0
Yippee....Thats what i want....

If I start of with

I end up with

Excel 2013/2016
A
Name : XYS
Age : 38
Mobile No : 123456789
Address : cb club gate
Name : ABC
Age : 42
Mobile No : 123456789
Address : River Valley

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]

[TD="align: center"]9[/TD]

</tbody>
 
Last edited:
Upvote 0
That's what my code in post#8 does!

If that doesn't work for you is your data EXACTLY the same as I used?
What error message do you get 7 on what line?
 
Upvote 0
Perfect....This is super perfect. You guys are super heroes.
Exactly that i need...

If I start of with

Excel 2013/2016
A
Name : XYS
Age : 38
Experience
Done Diploma
Engineering in CS
Mobile No : 123456789
Address : cb club gate
Name : ABC
Age : 42
Experience
Done Masters
Doing PHD
Certificate course in Electronics
Mobile No : 123456789
Address : River Valley

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: center"]10[/TD]

[TD="align: center"]11[/TD]

[TD="align: center"]12[/TD]

[TD="align: center"]13[/TD]

[TD="align: center"]14[/TD]

[TD="align: center"]15[/TD]

[TD="align: center"]16[/TD]

</tbody>
Sheet1



I end up with

Excel 2013/2016
A
Name : XYS
Age : 38
Mobile No : 123456789
Address : cb club gate
Name : ABC
Age : 42
Mobile No : 123456789
Address : River Valley

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]7[/TD]

[TD="align: center"]8[/TD]

[TD="align: center"]9[/TD]

</tbody>
Master

Are your values in col A & do they look EXACTLY like the samples you have given?
 
Upvote 0
Runtime error 13
If Rng.Offset(Rng.Count - 2).Resize(1, 1).Value Like "Mobile*" Then

Yellow arrow on left side

That's what my code in post#8 does!

If that doesn't work for you is your data EXACTLY the same as I used?
What error message do you get 7 on what line?
 
Last edited:
Upvote 0
That suggests that you have values like #N/A, #NA ME?, #VALUE ! or similar in one or more of your cells.
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
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