I have data in a tab, called "SourceData" in the following order:
[TABLE="width: 452"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]
[TABLE="width: 452"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Curr[/TD]
[TD]Company[/TD]
[TD]Department[/TD]
[TD]Account[/TD]
[TD]Account Name[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55100[/TD]
[TD]Salaries 1[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55110[/TD]
[TD]Salaries 2[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55120[/TD]
[TD]Salaries 3[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55130[/TD]
[TD]Salaries 4[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]120[/TD]
[TD="align: right"]55140[/TD]
[TD]Salaries 5[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55150[/TD]
[TD]Salaries 6[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55160[/TD]
[TD]Salaries 7[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55170[/TD]
[TD]Salaries 8[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55180[/TD]
[TD]Salaries 9[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55190[/TD]
[TD]Salaries 10[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55200[/TD]
[TD]Salaries 11[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55210[/TD]
[TD]Salaries 12[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55220[/TD]
[TD]Salaries 13[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55230[/TD]
[TD]Salaries 14[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55240[/TD]
[TD]Salaries 15[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55250[/TD]
[TD]Salaries 16[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55260[/TD]
[TD]Salaries 17[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55270[/TD]
[TD]Salaries 18[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55280[/TD]
[TD]Salaries 19[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55290[/TD]
[TD]Salaries 20[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55300[/TD]
[TD]Salaries 21[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55310[/TD]
[TD]Salaries 22[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55320[/TD]
[TD]Salaries 23[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55330[/TD]
[TD]Salaries 24[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55340[/TD]
[TD]Salaries 25[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55350[/TD]
[TD]Salaries 26[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55360[/TD]
[TD]Salaries 27[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55370[/TD]
[TD]Salaries 28[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55380[/TD]
[TD]Salaries 29[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
If Column A is USD and Column C is Dept 100, I'd like to copy every row and column in the "SourceData" tab that fits that criteria and put it in a "100 USD" tab.
Just curious what the VBA looks like to clear contents of every tab and then using multiple criteria (column A and Column C) to paste into respective tabs.
Let me know if there's any questions. Thank you!
[TABLE="width: 452"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]
[TABLE="width: 452"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Curr[/TD]
[TD]Company[/TD]
[TD]Department[/TD]
[TD]Account[/TD]
[TD]Account Name[/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55100[/TD]
[TD]Salaries 1[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55110[/TD]
[TD]Salaries 2[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55120[/TD]
[TD]Salaries 3[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55130[/TD]
[TD]Salaries 4[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]120[/TD]
[TD="align: right"]55140[/TD]
[TD]Salaries 5[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]400[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]120[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55150[/TD]
[TD]Salaries 6[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55160[/TD]
[TD]Salaries 7[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55170[/TD]
[TD]Salaries 8[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]55180[/TD]
[TD]Salaries 9[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55190[/TD]
[TD]Salaries 10[/TD]
[TD="align: right"]540[/TD]
[TD="align: right"]440[/TD]
[TD="align: right"]270[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55200[/TD]
[TD]Salaries 11[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55210[/TD]
[TD]Salaries 12[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55220[/TD]
[TD]Salaries 13[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]USD[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55230[/TD]
[TD]Salaries 14[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55240[/TD]
[TD]Salaries 15[/TD]
[TD="align: right"]580[/TD]
[TD="align: right"]480[/TD]
[TD="align: right"]310[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]55250[/TD]
[TD]Salaries 16[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55260[/TD]
[TD]Salaries 17[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55270[/TD]
[TD]Salaries 18[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55280[/TD]
[TD]Salaries 19[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]250[/TD]
[TD="align: right"]55290[/TD]
[TD]Salaries 20[/TD]
[TD="align: right"]620[/TD]
[TD="align: right"]520[/TD]
[TD="align: right"]350[/TD]
[TD="align: right"]240[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55300[/TD]
[TD]Salaries 21[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55310[/TD]
[TD]Salaries 22[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55320[/TD]
[TD]Salaries 23[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]EUR[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55330[/TD]
[TD]Salaries 24[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55340[/TD]
[TD]Salaries 25[/TD]
[TD="align: right"]660[/TD]
[TD="align: right"]560[/TD]
[TD="align: right"]390[/TD]
[TD="align: right"]280[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55350[/TD]
[TD]Salaries 26[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55360[/TD]
[TD]Salaries 27[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55370[/TD]
[TD]Salaries 28[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
[TR]
[TD]CNY[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]55380[/TD]
[TD]Salaries 29[/TD]
[TD="align: right"]700[/TD]
[TD="align: right"]600[/TD]
[TD="align: right"]430[/TD]
[TD="align: right"]320[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
If Column A is USD and Column C is Dept 100, I'd like to copy every row and column in the "SourceData" tab that fits that criteria and put it in a "100 USD" tab.
Just curious what the VBA looks like to clear contents of every tab and then using multiple criteria (column A and Column C) to paste into respective tabs.
Let me know if there's any questions. Thank you!