Having problem in assigning values between two excel sheets

Problem statement : I am having two excel files and trying to assign value of a column from one excel to another .While applying i tried lookup activity but it is not working accordingly.

File1 screenshot image File1.xlsx (8.2 KB)
File2 screenshot image File2.xlsx (8.3 KB)

Output file should be like image

The output is like “for repeated values (like 2 & 3 here) , the status of assigned values will be of the same order(like for 2 its No then Yes) order should be same .

The workflow i made was packed.xaml (14.1 KB)

But it is not showing the results i want.

Can anyone suggest what should i use or change in the workflow.

@ppr @Palaniyappan please help

1 Like

here you go with an xaml
xls.zip (21.7 KB)

Cheers @Soniya215

Thanks for the workflow @Palaniyappan but if i change the values it is not giving the reults .
Like File1 image
File2 image

I am getting “Yes” for “2” but it should be “Yes” and then “No” for “2”.
“No” for “3” but it should be “No” and then “Yes” for “3”.

Thanks again @Palaniyappan for your contribution.
I know it can be a bit confusing to understand the problem but it will be of a great help.

if you can see here 2 has yes and no value in it
thats why bot is confusing

Cheers @Soniya215

Thanks @Palaniyappan but this is the reason i asked that how should i solve this confusion because the result should be like it assign Yes to first “2” and then No to second “2” and so on in the same sequence.
I am unable to find the best solution that how will it work.

1 Like

I think the problem is because of lookup activity is there any alternate solution for lookup activity? @Palaniyappan

1 Like

@Palaniyappan @ppr Are you available for the help. Please suggest if anything new can be done to get the results.

1 Like

sure me and @Palaniyappan will help you. Give us some little time.


Fine buddy

But a small doubt is it for only 2 or the same for same for all numbers like here in the example I could see like 5 occurs only once but is assigned with No, but it should be Yes right for being the first value

Kindly correct me if I m wrong

Cheers @Soniya215

1 Like

Thanks @Palaniyappan The thing is, for duplicate numbers the values should be assigned in the same order (irrespective of Yes or No coming first)and for single ones it will be the same . Yes and No are status which can change .

There is no relation between numbers occuring once with Yes or No and numbers occuring twice with Yes or No.

The input and output will be like shown in file1 and file2 respectively

The arrows are connecting the input and output.

1 Like

The scenario looks like a clasical “the bot is not me” problem. Such a problem can be identified by checking on following: Is in the requirement description / processing rule definition a part of cognitive action, that is omited?. Because of this lack, the implementation is challenging.

Lets map this to your scenario:

  • look up / Join will let us lose 2-Yes, 2-No case, due first found value will be picked up
  • the cognitive part is that the eye looks on the downer line, identifies the other line 2-No and is adding this to the report as well.

currently File 1 is nothing else as File 2 without column Quality and is in another order. Now we have to dig more within the requirements and have to look on a case on Row count File 1 is not Row Count File 2. From this case we can further rules.

Maybe following approach can be used and implemented:

  • iterate over list 2
  • lookup for number in list 1
  • if found - use it, if not found use “not found” or leave it empty
  • if lookup value is used mark it internaly as used, and do lookup on next not used value

@Soniya215 maybe you can gather some more rules / requirements so @Palaniyappan, me can help you on the setting up the appropriate solution approach

1 Like


Can you try the attached code?

As of now, the code will work only if the Excel1 and excel 2 has same set of numbers.
eg, if 2 is in 3 times in excel 1 the in excel 2 also it should be 3 times

UiPath COmmunity FOrum.zip (14.7 KB)


Find a demo xaml here:
Soniya215_UpdateNotOnlyWithFirst.xaml (13.0 KB)

following is implemented:

  • iterating over dt2
  • lookup for dt2.Number in dt1
    • if status value is found then use it, otherwise use “Nothing”
    • if status value was used 1 time, then do not use anymore

@ppr and @MuralidharVankamaddi I am very thankful to you for the help. @MuralidharVankamaddi the workflow is working but if i have some condition like the output file contain a row which is not present in input file then it is assigning “No” to it whereas it should skip that row (i.e. do nothing). Where should i apply this condition in your workflow.
For example
**This is input file ** image
This is resulting output file image

It should skip the 5th row but it is assigning “No” to it . Why is it so?
Please help.

@Soniya215 ,

Please assign a null value toy he “output” status before the second loop.

So, it will skip the row which is not present in the input file and also if input file(reference) has number 2 as two times and output file has 2 has more than two time the bot will assign the respective status for first 2 items and skip the remaining Number “2”

1 Like

Thanks a lot @MuralidharVankamaddi :slightly_smiling_face:

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