Pass data from a excel to another and using a if

Hello, I want to iterate from an especific column in an excel file “ExcelBDNS” to write in another one “ExcelMaster” the same variables of the column amb interating, but first i want to check if in “ExcelMaster” the variable is already write it.

I’m using the modern version, here are some screeshoots of the automation i did. I think it’s correct, but for some reason doesn’t work…



hi @Carla_Munoz
follow this steps:
1- read both tables
2-for each in ExcelMaster
3-lookup the value in the other table
4-if value exist
5-assign row(“your header”)= value
6-write range
try it

1 Like

What i have to write in the lookup? This activitie i never used it

@Carla_Munoz

All of it look proper apart from one thing…

In the where to write it should be .CellValue as well…also it would be good if you can use different references for both use excel file activities

Also better flow would be as below which helps in little optimization

  1. Read the first excel into a datatable
  2. Have use excel file for second excel and then use for each row in excel on second file
  3. Inisde that loop use filter datatable on first dt you read…and save it to filtereddt
  4. Use if condiyion with filtereddt.Rowcount>0
  5. On then side use your write cell activity

Cheers


@Carla_Munoz
datatable–>ExcelBDNS
lookupvalue–>row(your header that have shared value with other table)
column name–>the name of header in ExcelBDNS that have the value that you will search in
cellvalue–>your output var
column name–>the column that have your value to save it in your var(the wanted column)

1 Like

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