jordanburch
Active Member
- Joined
- Jun 10, 2016
- Messages
- 440
- Office Version
- 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
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