Insert new column (with values based on criteria) using existing macro

  • Hi,


    This is my current macro to auto populate a summary table from Sheet1 to a new worksheet named "Summary". The table consists of Reported, Unreported and Total parts.

    Now I need help to modify the macro so that it can also insert a new column in Sheet1 (column K) named "To Do". The values in this column should referenced to the Reported and Unreported criteria.


    I have attached the excel file to show how Sheet1 looks like.


    TIA!


    1.xlsx1.xlsx

  • Oh ya, because my macro is saved in Personal workbook. But the example file is how the original file looks like...

    Is there anything else I should include as an example?

  • I'm trying to figure out what you are counting. Why do you not Format the data as a Table which will be dynamic and then I would suggest a PivotTable

  • The existing macro helps to auto populate a summary table based on the data from Sheet1.

    Criteria for Reported
    1. 3TG=No; Date within 2 years
    2. 3TG=Yes; Date within 1 year

    Criteria for Unreported
    1. 3TG=No; Date > 2 years
    2. 3TG=Yes; Date > 1 year
    3. 3TG and Date=NULL

    Criteria for Total
    1. Reported + Unreported


    I need to have the Reported and Unreported information included in Sheet1 under the To Do column.


    Reason I am using macro is because I will be downloading similar report on a daily basis. Therefore I chose macro over pivot table.