Macro - to cut the entir row and paste at the bottom after leaving 5 empty rows

harikrishna

New Member
Joined
Aug 19, 2011
Messages
38
HI, please provide a macro -That finds the data in a particular column and cut the entire row and paste that row at the end of the orginal data after leaving 5 rows (empty rows).
eg:- 1. if a cell in column E contains as "998150", then the entire row should be cut and paste at the bottom of the data after leaving 5 empty rows. And it should be continuous till all the rows with same data(998150) in Column E.

2. All the cut rows shoud pasted one below the other.
Eg: if a cell in Column E and row # 20 contains 998150 it should be cut and pasted at the end of teh data (as mentioned above). And if a cell in Column E and row # 21 also contains 998150 it should be cut and pasted just below to the above last row which is pasted.

I mean all the data/rows which has been cut must be pasted one below to other after the end of original data as mentioned in point 1 above.

for your clear under standing..........

000010000
000010000
000010000 " Assume these five rows are original data"
000000000
000020000

I am finding the data "1" in a cell of Column E. As we have 3 rows which meet our crieteria, those three rows should cut and paste at the bottom of the above original data as shows below....

000000000
000020000
-----------
-----------
----------- "Assume thse five are empty rows after the original data"
-----------
-----------
000010000
000010000 "this is the data which is cut from the above original 000010000 data and pasted after leaving 5 rows of gap from original data"
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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