I want to add the sum of 5 spaces and put the value of -2.5 in the first column.

If the sum is not 2.5, I want to leave it as it is.

Through the current read range, I have created a data table of 5 spaces.

I don’t know the process of adding the sum and creating the condition.

Hello @wjdehdnr456

Sequence

Read Range (Excel Application Scope or Workbook Read Range) // Output: YourDataTable

Assign

`sum = YourDataTable.Compute("SUM(Column1)", "")`

If (Condition: `sum = 2.5`

)

For Each Row (TypeArgument: DataRow)

Assign

`row("Column1") = -2.5`

Write Range (Excel Application Scope or Workbook Write Range) // Input: YourDataTable

Thanks & Cheers!!!

hi @wjdehdnr456 ,

You can convert row to int32 or double to calculate by

Integer.Parse(row(‘your column name’).ToString)

or

CDbl(row(‘your column name’).ToString)

regards,

How do you make a column name?

I made it into a row

If you file without header

you can get by index from 0

1st column is row(0)

convert to integer

Integer.Parse(row(0).ToString)

and to double

CDbl(row(0).ToString)

regards,

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