Compare a column in Excel

hello
Make a new sheet (sheet3)

  1. It contains a comparison between the first and second sheets in relation to the date column in columns B in sheet1 and D in sheet 2
    2.Sum the numbers in column H in sheet 1 for each date separately and compare the number in F in sheet 2
    3.Print the difference between them in sheet 3

Sheet outputs 3

the date
Total quantity of the first sheet
The quantity of the second sheet
The difference between them

@Muneer_Alrashdan1

  1. Read Data from Excel Sheets:
  • Use Excel Application Scope to open the Excel file.
  • Use Read Range to read data from “Sheet1” and “Sheet2” into DataTables dtSheet1 and dtSheet2.
  1. Sum Values in Sheet1:
  • Create a dictionary to store summed values.
  • Use a For Each Row activity to iterate through dtSheet1.
    • For each unique date in column B, sum the values in column H.
    • Store the date and sum in the dictionary.
  1. Compare Sum with Sheet2:
  • Create a new DataTable dtDifferences with columns for “Date” and “Difference”.
  • Use a For Each Row activity to iterate through dtSheet2.
    • For each date in column D, compare the summed value from the dictionary with the value in column F.
    • Calculate the difference and add a new row to dtDifferences.
  1. Write Differences to Sheet3:
  • Use Write Range to write dtDifferences to “Sheet3”.