How to add a fill a row based on row value and column head

Hi
I m having a value of “keyti” and “Minutes”
i want to find the correct row and column and put “present” in the cell"
can someone help me with this

hey @Tharusha.fernando try this using “for each loop data table”

IF(currentrow(“Client”).equals(“keyti”))
assign: currentrow(“Minutes”) = “Present”

1 Like

hi @sai_krishna_somisetty
that also correct but searching for a LINQ query

Hi @Tharusha.fernando

Please try this

dt.AsEnumerable.Where(function(row) row(“Client”).tostring.tolower = “keyti”).ToList.ForEach(sub(row) row(“Minutes”) = “Present”)

dtTable = output from build datatable , use read range instead of build datatable

image

image

Thanks

1 Like

Hi @Tharusha.fernando ,

Use below query it will give you the row number.
Just update it with your columns and condition.
Output you can get it in String.

(dt.Rows.IndexOf(dt.AsEnumerable().Where(Function(row) row.Item(“Number”).ToString.Equals(“1234567894”)).ToArray()(0)) + 1).ToString

1 Like

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