Compare ranges in 2 sheets and delete/add cell depend on a value in different cell

  • There is a workbook "Project" and it has "ProjectList" and "MonthlyReport" worksheets. The detail is as follows.


    ProjectList:
    //// A ///// B / C / D /...
    1///////////Oct/Nov/Dec/...
    2/Project1/ 1 / 2 / 0 /...
    3/Project2/ 2 / 1 / 1 /...
    4/Project3/ 0 / 0 / 1 /...


    MonthlyReport:
    //// A /////////// B / ...
    1 / Project1 / Detail 1 /...
    2 / Project2 / Detail 2 /...


    MonthlyReport is updated every month.
    If the report was made based on Nov,
    then Project1 needs to be deleted from the report
    because there is no value in Dec and Project3 needs to be added to the report.
    Anyone can help me to figure out this please?!
    :thanx:
    Noriko

  • Re: Compare ranges in 2 sheets and delete/add cell depend on a value in different cell


    In a blank column in the monthly report, use this formula (change the range on project list accordingly):
    =MATCH(A1,'Project List'$A$1:$A:$100,0)
    Copy this all the way down. Then filter on the errors and delete the rows.


    Hope this helps.

    Barrie Davidson
    My Excel Web Page
    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  • Re: Compare ranges in 2 sheets and delete/add cell depend on a value in different cell


    Thank you for your help.
    But it was not what I am looking for.
    I should have described more detail.


    I have made VBA code to create duplication of the previous monthly report sheet at the beginning of every month. And rename it with "mmm yyyy".


    Then I need VBA code to update (delete/add) project lists in monthly report sheet based on project's value in month column in Project list sheet.
    (If date is Dec, check Dec column)


    Can you help me again please?!


    :) Noriko

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!