Idea to insert value into excel file

In scenario.must be to insert value in red cell and yellow cell after sum from condition then insert to green cell.
anybody have idea to create solution. please share idea for me,Thx.

  1. your range of the particular cells are constant?
  2. If your amount column lies in the same column, then in the read range, give the range as “A:A” and get the row count. Then you will get the red cell as count + 1.
  3. The same count + 1 is the count of yellow it seems. If no, again read range and give the range as “N:N”

if differs, read the entire data and store in data table . Then, use for each
and loop through datatable.columns and use if condition to check the column name. Again the same process as above