VBA code that returns the results of macro in a MsgBox

  • At the end of running my macro I would really like it if a message box appeared displaying the results of the macro.The data in sheet 1&2 should be identical, so when the macro is run the results in sheet 3 should show no data because there is no discrepancy. Now, if there are discrepancies between the data in sheet 1 and sheet 2, sheet 3 will show those discrepancies and highlight them. (I have uploaded the image of Sheet 3 to show what that looks like. The data highlighted in Orange, at the top, is the correct data from sheet 1, and the data highlighted in Yellow, under the title Sheet 2 V Sheet 1, is the data with the discrepancies in sheet 2). Once the macro has been run i would like a message box at the end that returns the result of "x"number of discrepancies were identified (if we use the example of sheet 3 - the uploaded image- the message box would say 2 discrepancies were identified, but if there were no discrepancies identified between sheet 1 and sheet 2 then the message box would say no discrepancies were identified).

Participate now!

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