Code to copy selected data to new sheet

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Guys
I have this sheet B2B where there are some unwanted rows I want to remove. First I need to create, Move and make a copy of B2B sheet and rename the copy sheet to 2B, then I want to delete all the rows if those rows fulfill 2 conditions.
1. In the column H, the rows which contain Yes and Y, the whole row to be deleted.
2. If the values in columns in J, K, L and M are 0 (zero)(Match Entire cell contents), the whole row to be deleted.
A code will be easier to find and delete as the data has more than 1000 rows in some cases and the rows fulfilling the 2 conditions are not in an order. They can be in the middle or in between anywhere in the sheet.
The expected result is shown in the workbook. As the data is huge and above the prescribed limit of 3000 cells I am sharing the link to the workbook for your reference.

Loading Google Sheets
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I just came across this video to copy paste data to a new sheet if multiple conditions are met. I have taken a screen shot of the code. But to customize the code to this workbook is not at all my cup of tea. Only an expert can understand and edit this code to work on my workbook. The only difference is my code has to create the destination sheet and then copy the data to that sheet.
 

Attachments

  • CopyPaste with multiple conditions.png
    CopyPaste with multiple conditions.png
    221.2 KB · Views: 16
Upvote 0
I have edited the above question and added one more condition in the query. I wonder why nobody is noticing this query. I have explained it so simple words. If anyone has any doubts please let me know. The link to the new workbook is shared below.
I have this sheet B2B where there are some unwanted rows I want to remove. First I need to create, Move and make a copy of B2B sheet and rename the copy sheet to 2B, then I want to delete all the rows if those rows fulfill 3 conditions.
1. In B2B sheet if the column H contains Yes or Y shift both.
2. In B2B sheet if the Invoice value and Taxable value in one row are the same. Columns F and J.
3. In Portal sheet column Rate if the value is 0 (Match entire cell contents).

Loading Google Sheets
 
Upvote 0
I have included in the data all the 3 kinds of rows as per eachcondition which are not to be shown in 2B sheet I have also colored the cells to yellow for your reference.
 
Upvote 0
Request not to answer to this query as I have changed the whole project with a different idea.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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