Subtract 2 row values and add the result to 3rd row

I have 2 rows . Ignore the dates. I have to subtract the row(0)-row(2) and add the result to the 3rd row. read the 3rd row range and paste it to different excel. Please help

Hello @RenukaRPA

Sequence
Excel Application Scope (Read Excel File)
Read Range (Output: dtData, Sheet Name: “YourSheetName”)
Assign (Perform Calculation)
For Each Row (Input: dtData)
Assign (Value: row(0) - row(2) + row(3))
Excel Application Scope (Write to New Excel File)
Write Range (Input: dtData, Sheet Name: “YourNewSheetName”)

Thanks & Cheers!!!

Thanks , But the requirement was need to subtract the two rows and update the thrid row with the result of subtraction

Hi @RenukaRPA

For the Subtraction

  1. Read Range
  2. For each Row
  3. Use assign
    varThirdRow=CurrentRow(0)-Current(2)
    varThirdRow=CurrentRow("ThirdRow).ToString

Read the excel where you had performed suntraction
Use filter DataTable to remove the unnecessary column
Use write range to write it in different excel

Hope this helps

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.