vba to filter columns sum one column do the same on a different workbook and then copy and paste

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
251
Office Version
  1. 2016
Hey guys,

Ive been searching the forum for a code that does a mini recon. Basically it filters like so below
ActiveSheet.Range("$A$1:$AN$4138").AutoFilter Field:=6
ActiveSheet.Range("$A$1:$AN$4138").AutoFilter Field:=5, Criteria1:="3875"
ActiveSheet.Range("$A$1:$AN$4138").AutoFilter Field:=6, Criteria1:="1110"
Sheets("MAY FY20 IDARRS").Select
ActiveSheet.Range("$A$1:$AN$4138").AutoFilter Field:=8, Criteria1:="GFEBS"
Columns("J:J").Select
Sheets("AFT").Select
ActiveSheet.Range("$A$1:$AK$1758").AutoFilter Field:=33
ActiveSheet.Range("$A$1:$AK$1758").AutoFilter Field:=32
ActiveSheet.Range("$A$1:$AK$1758").AutoFilter Field:=32, Criteria1:="3875"
ActiveSheet.Range("$A$1:$AK$1758").AutoFilter Field:=33, Criteria1:="1110"
then it does the same in a different workbook and sees if the colmuns match if they do it takes the visible cells but not the headers and pastes below on the previous worksheet. Hopefully this makes sense.
does anyone have code like that?
so basically if the sum of column j after filtered equals the sum in column ah in the other sheet then copy and paste the data from the other sheet to a new sheet and it will continue to loop and copy below the data. So it will go to criteria 3885 criteria 1200 and compare it to the other spreadsheet and sum the columns again and compare and if they are the same then it will copy and paste that data below the previous data. It will continue to loop through all the numbers that I put in there.


Jordan
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Watch MrExcel Video

Forum statistics

Threads
1,122,509
Messages
5,596,561
Members
414,077
Latest member
ammylar5

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
Top