coniditional copy and paste advanced filtering

daveyc18

Well-known Member
Joined
Feb 11, 2013
Messages
707
Office Version
  1. 365
  2. 2010
i have an advanced filter, but so far there's no relevant data so after the advanced filter, only the header row shows up and the total row (ie the row after all the data) is blank. (currently the total row as of today is 24,000 but it can change daily depending on the day's data....again, the advanced filter doesn't show anything because the data as of today isn't relevant according to the advanced filter criteria)

however, ONLY WHEN THERE IS relevant data, I would need to CLEAR sheet1 and then paste the data onto sheet1.

i don't want to clear sheet if there's no relevant data because i have some dummy data on sheet1 to show the analyst how to analyze and monitor the spreadsheet.

so, essentially...i want the code to do something like this:


-open the source workbook with data
-advanced filter
-if there's no relevant data and only the header shows, skip the rest of the macro and say "no positions"
-if there IS relevant data after the filter, clear sheet1 and then copy and paste the data onto sheet1
 
Last edited:

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
i have an advanced filter, but so far there's no relevant data so after the advanced filter, only the header row shows up and the total row (ie the row after all the data) is blank. (currently the total row as of today is 24,000 but it can change daily depending on the day's data....again, the advanced filter doesn't show anything because the data as of today isn't relevant according to the advanced filter criteria)

however, ONLY WHEN THERE IS relevant data, I would need to CLEAR sheet1 and then paste the data onto sheet1.

i don't want to clear sheet if there's no relevant data because i have some dummy data on sheet1 to show the analyst how to analyze and monitor the spreadsheet.

so, essentially...i want the code to do something like this:


-open the source workbook with data
-advanced filter
-if there's no relevant data and only the header shows, skip the rest of the macro and say "no positions"
-if there IS relevant data after the filter, clear sheet1 and then copy and paste the data onto sheet1


You already have a code, you can put it to adjust it.
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,795
Members
449,048
Latest member
greyangel23

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