Excel adjacent column value needed

I’m iterating through a column of excel file which is saved as data table. I need to check the value, and if it is greater than 100, then i need to check whether the adjacent cell is populated or not. How do I get adjacent cell value?

hi @tanu

first read the table
-Then for each row in table
– if row(column index ) equal or grather than 100
—then

—else

Hi @tanu !
It depends on what you want, here is a suggestion:
population_of_excel.xaml (9.0 KB)

Don’t forget to apply the idea on your workflow and change with your own column names.

  • if you want to have a datatable that contains all the problematic columns, then you can use filter option in the first sequence
  • if you want when iterating through the datatable to act, then you can use the second sequence

When you say that you want the adjacent cell value, do you confirm that you know what is the name of your 2 columns ? If not, then maybe do you have a constant index ? If not then we will think together of another solution.

1 Like

So this is the excel, i have data table for cc and total. I need to check each value of total, if greater than 10k need to check adjacent is populated or not. the cases where it is not, i need to print corresponding cc value.

I hope the query is clear? Can you help?

So this is the excel, i have data table for cc and total. I need to check each value of total, if greater than 10k need to check adjacent is populated or not. the cases where it is not, i need to print corresponding cc value.

I hope the query is clear? Can you help?

DatatableAdjacentValue.xaml (10.4 KB)
I hope this would work
let me know if you need more information about the xaml

1 Like

This helps, but my problem is that I don’t have a single datatable. My CC data table is different, and total data table is different. hmm, maybe joining them will help?

Thank you for help, but also I need corresponding data from next column named multiple in case value is greater than 10k

after joining the datatable you can just change the column name in the assign and you will get that value.
hope it helps

Yes, trying that. And the condition for adjacent column? any idea?

Check my xaml
In that xaml
dtTestData.Rows(foreachIndex).Item(“your column name”).ToString
you can find out any column data not only adjacent one

Well, that column is just a part of excel, it is not saved separately as a data table.

if it is in excel you can make it as datatable and you have to find out some matching criteria to that datatble then take the value

Thank you.

Hi @tanu !
Is your problem solved ?
If yes, don’t forget to mark your topic as solved !
If no, let us know where it does not work so we work together on it :grinning_face_with_smiling_eyes: