Macro to compare the 3 columns "SEC Code

Closed
Kaef - Updated on Feb 13, 2018 at 04:32 PM
 Blocked Profile - Feb 13, 2018 at 05:01 PM
Hi All,

I would really appreciate your help in providing me with a macro to save me some time on the following.

1- Everyday i receive 2 reports in .txt that i convert to excel after reorganizing the data (dlimit)
2- Once the 2 sheets are created in excel the columns are as follows
SYSTEM A SEC CODE ACCT TDATE F ROC AMT

Is there any way that a macro will be able to compare the 3 columns "SEC CODE" "Trade date" and "ACCT" and if these 3 numbers together matches between the 2 sheets create a new sheet with all the information of these rows from sheet 1 and sheet 2.

In addition to that i would need on the new sheet 3 to have an extra row that will sum the ROC AMT for the columns that have the same data simultaneously in the 3 columns "SEC CODE" "Trade date" and "ACCT"

Thanks
Kaef
Related:

1 response

Blocked Profile
Feb 13, 2018 at 05:01 PM
The syntax for inspecting the value of a cell is as follows:

thevariable = ThisWorkBook.WorkSheets(sheet_name).Range(cell_reference).value


Now just make your logic for who wins!
0