How to change column value based another column value

Hi Team,

I need to change column value based on another value

If “yy” column found any negative value should change to column “vv” value if found “NO” i want to change “YES”.

Please help me anyone for this.

Input:
image

Note: Expected output i marked bold just highlighting purpose.

Expected output:

The image shows a partial spreadsheet with columns titled 'xxx,' 'yy,' 'zzz,' 'vv,' and 'bbb,' containing various text and numeric values with some values formatted in bold. (Captioned by AI)

@Raja.G

Read the data into datatable

Then use invoke code by passing dt as io argument

Dt.AsEnumerable.Where(function(x) Cdbl(x("yy").ToString.Trim)<0).ToList.ForEach(sub(r) r("vv") = "Yes")

After this use write range and write the datatable back

Cheers

1 Like

How to Update Data Column Values of a Data Table | Community Blog

later section is elaborating on updating a subset

1 Like

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