Macro to compare the 3 columns "SEC Code

Kaef - Feb 13, 2018 at 04:11 PM - Latest reply: ac3mark 8846 Posts Monday June 3, 2013Registration dateModeratorStatus February 23, 2018 Last seen
- 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
See more 

1 reply

Reply to this topic
ac3mark 8846 Posts Monday June 3, 2013Registration dateModeratorStatus February 23, 2018 Last seen - Feb 13, 2018 at 05:01 PM
0
Helpful
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!
Respond to ac3mark