I want to run a search and write to Excel if no value is found in the results

I would like to achieve the following:
How should I configure this?

  1. Search for a value retrieved from Excel.
  2. If the search results don’t contain an exact match for the value, write that value to Excel.
    If there is an exact match, click the checkbox to select it.
    If there are multiple matches for the value, write that value to Excel.

I tried using Try Catch and similar approaches, but since it searches for the value one result at a time, it takes a long time, and it doesn’t seem to be finding the matches correctly.
Also, I’m unable to write the value to Excel.

I apologize for the trouble, and I would greatly appreciate your help.

@afna

Can you give more details,
like where you are searching some screenshot like that

If there are multiple matches for the searched value,

I can’t quite picture what you mean. Could you attach a screenshot?

Hi @afna

Load the Excel data using Read Range. Loop through each value with For Each Row in Data Table. Retrieve the search results with Find Children, then check for a match using Get Text or Get Attribute. If there are no matches, write to Excel using Append Range. If there is one match, click the checkbox using Click. If there are multiple matches, write all of them to Excel using Append Range. Use If for conditional branching; do not use Try Catch.
Language generated by an LLM.

Happy Automation